@e2e-dev/github posts test results as a pull request comment, including
failures, source links, and links to workflow artifacts. Reruns update the
same comment, and a --last-failed rerun updates it as one run. The reporter
also writes the results to the job summary.
Setup
e2e.config.ts
GITHUB_TOKEN to the test step:
.github/workflows/e2e.yml
web/tests_billing.e2e.ts__upgrades/default/attempt-0/), so keep
path: .e2e/artifacts and the download lines up with the report. A
--last-failed rerun keeps the first run’s directories and puts its own
under rerun-1/, so a flaky test’s failed attempt still links to its own
files. A project
below the checkout root, such as packages/e2e-tests, gets source links under
that path. The checkout root is the nearest directory holding .git inside
GITHUB_WORKSPACE, so actions/checkout with a path input works too.
The comment
@someone or https://... notifies no one and
links nowhere.
The built-in markdown reporter writes the same summary to
.e2e/summary.md.
Rerunning the failed tests
A step that gives failed tests a second chance keeps one comment for both passes:--max-failures stopped
before it ran, or a failed beforeAll or afterAll whose tests another
filter kept out of the rerun. It shows ⏹️ when the rerun left out a test the
first pass never finished. The rerun’s own exit code counts only what it ran.
A failed attempt’s evidence links to the first run’s files, which the rerun
keeps.
Matrix jobs
The reporter identifies a comment by project, workflow, and job. Matrix jobs share those identifiers, so give each matrix entry a distinctkey:
MATRIX_BROWSER: ${{ matrix.browser }} in the step’s env. The key also
appears in the headline, such as e2e chromium: 77 passed. Keep it stable
across runs so reruns update the existing comment.
When nothing is posted
The reporter never changes the run’s status or exit code. When it cannot post, it says why in one row under the summary:
The token is read when the run finishes and is excluded from the report.
GitHub Enterprise Server uses
GITHUB_SERVER_URL and GITHUB_API_URL.
