From 56e44935a8900c33c86f19897466993654dd3459 Mon Sep 17 00:00:00 2001 From: conservationtimothy Date: Wed, 29 Jul 2026 15:00:27 +0100 Subject: [PATCH 1/2] Run gc-stack-deploy unit tests in GitHub Actions on push --- .github/workflows/unit-tests.yml | 18 ++++++++++++++++++ caprover/tests/README.md | 6 +++--- 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml new file mode 100644 index 0000000..c14adf0 --- /dev/null +++ b/.github/workflows/unit-tests.yml @@ -0,0 +1,18 @@ +name: Unit tests + +on: + push: + +jobs: + test-unit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Run gc-stack-deploy unit tests + run: make -C caprover/tests test-unit diff --git a/caprover/tests/README.md b/caprover/tests/README.md index 156bb63..5bdfa9e 100644 --- a/caprover/tests/README.md +++ b/caprover/tests/README.md @@ -14,9 +14,9 @@ setting up and tearing down a CapRover server). ## When to run Tests -Since we have not automated running tests (e.g. in CI), we provide a simple recommendation: - -* Run the tests locally for every change to `stack_deploy.py` or `stack.example.yaml` +Unit tests (`make -C caprover/tests test-unit`) run in GitHub Actions on branch push. +CapRover e2e tests cannot; run those locally for every change to `stack_deploy.py` or +`stack.example.yaml`. You probably do not need to run the tests when adding/modifying one-click app definitions, because that build step is in fact run automatically in CI. From 88a02823b628f7f5b987380456352afb5f8f7b68 Mon Sep 17 00:00:00 2001 From: osa Date: Wed, 29 Jul 2026 22:12:28 +0100 Subject: [PATCH 2/2] Update caprover/tests/README.md Co-authored-by: Jeffrey Gerard --- caprover/tests/README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/caprover/tests/README.md b/caprover/tests/README.md index 5bdfa9e..756dbc5 100644 --- a/caprover/tests/README.md +++ b/caprover/tests/README.md @@ -14,12 +14,11 @@ setting up and tearing down a CapRover server). ## When to run Tests -Unit tests (`make -C caprover/tests test-unit`) run in GitHub Actions on branch push. -CapRover e2e tests cannot; run those locally for every change to `stack_deploy.py` or -`stack.example.yaml`. +GitHub Actions runs **unit tests only**. It cannot run e2e tests. -You probably do not need to run the tests when adding/modifying one-click app definitions, -because that build step is in fact run automatically in CI. +For every change to `gc-stack-deploy`, including the YAML file, +and every change to one-click apps, +run the E2E tests locally (`make -C caprover/tests all`) ## Prerequisites