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..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 -Since we have not automated running tests (e.g. in CI), we provide a simple recommendation: +GitHub Actions runs **unit tests only**. It cannot run e2e tests. -* Run the tests 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. +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