diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..2034472 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,42 @@ +name: E2E tests + +on: + push: + branches: [master] + workflow_dispatch: + +permissions: + contents: read + +jobs: + e2e: + runs-on: ubuntu-latest + timeout-minutes: 20 + steps: + - name: Check out source + uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + with: + persist-credentials: false + + - name: Set up Node.js + uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 + with: + node-version: 22 + cache: npm + + - name: Install dependencies + run: npm ci --legacy-peer-deps + + - name: Run e2e tests + env: + JEST_JUNIT_OUTPUT_DIR: ${{ runner.temp }}/e2e-results + run: npm run e2e -- --ci --runInBand + + - name: Upload test report + if: always() + uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 + with: + name: e2e-results + path: ${{ runner.temp }}/e2e-results/junit.xml + if-no-files-found: warn + retention-days: 14 diff --git a/.gitignore b/.gitignore index 61ff098..c15082d 100755 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,9 @@ node_modules /test-results.xml .vscode/ +.idea coverage/ junit.xml .claude -.cursor \ No newline at end of file +.cursor diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b9d0494..8ee796d 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,3 +17,17 @@ All third-party contributions to this project must be accompanied by a signed co All submissions should come in the form of pull requests and need to be reviewed by project committers. Read [GitHub's pull request documentation](https://help.github.com/articles/about-pull-requests/) for more information on sending pull requests. Lastly, please follow the [pull request template](PULL_REQUEST_TEMPLATE.md) when submitting a pull request! + +## End-to-end tests + +The `E2E tests` GitHub Actions workflow runs after each push to `master`, including +merged pull requests, and can also be started manually using `workflow_dispatch`. +It uses Node.js 22 on Ubuntu and installs dependencies from the committed lockfile. +This is a post-merge regression check, not a merge or publishing gate. + +To run the same suite locally: + +```sh +npm ci --legacy-peer-deps +npm run e2e -- --ci --runInBand +```