diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 2126543..7bd818e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -15,6 +15,8 @@ RUN sh /uv-installer.sh && rm /uv-installer.sh # Ensure the installed binary is on the `PATH` ENV PATH="/root/.cargo/bin/:$PATH" +# Extra things needed to run e2e tests in CI +# Ignore this for local/prod development FROM python_base AS python_e2e ENV UV_PROJECT_ENVIRONMENT=/root/.cache/uv diff --git a/.devcontainer/docker-compose.e2e.yml b/.devcontainer/docker-compose.e2e.yml index a033437..6181a28 100644 --- a/.devcontainer/docker-compose.e2e.yml +++ b/.devcontainer/docker-compose.e2e.yml @@ -1,3 +1,7 @@ +# Overrides to run e2e tests in CI +# Shouldn't be needed for normal development +# E.g. docker compose -f docker-compose.yml -f docker-compose.e2e.yml up + services: app: build: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 252cba2..0643bf2 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -23,3 +23,10 @@ jobs: uses: cypress-io/github-action@v6 with: working-directory: ./e2e + + - name: Upload screenshots + uses: actions/upload-artifact@v4 + if: failure() + with: + name: cypress-snapshots + path: ./e2e/cypress/snapshots diff --git a/e2e/README.md b/e2e/README.md new file mode 100644 index 0000000..645e0a2 --- /dev/null +++ b/e2e/README.md @@ -0,0 +1,8 @@ +# E2E Tests + +## Running + +1. Have node installed +2. Have the fast API server running on port 8000 (see parent README) +3. `npm install` +4. `npm run cy:open`