mirror of
https://github.com/tester-army/e2e.git
synced 2026-12-06 05:16:02 +08:00
34 lines
1.1 KiB
Markdown
34 lines
1.1 KiB
Markdown
# @e2e-dev/github
|
|
|
|
The GitHub reporter for [`e2e`](https://www.npmjs.com/package/e2e).
|
|
From GitHub Actions, every run becomes one pull request comment, edited in
|
|
place on reruns, and the same text lands in the job summary.
|
|
|
|
```bash
|
|
npm install --save-dev @e2e-dev/github
|
|
```
|
|
|
|
```ts title="e2e.config.ts"
|
|
import type { E2EConfig } from 'e2e';
|
|
import { web } from '@e2e-dev/web';
|
|
import { github } from '@e2e-dev/github';
|
|
|
|
export default {
|
|
targets: [{ engine: web(), app: { url: 'http://localhost:3000' } }],
|
|
reporters: ['list', github()],
|
|
} satisfies E2EConfig;
|
|
```
|
|
|
|
The job needs `permissions: pull-requests: write` and the step that runs
|
|
`e2e` needs `GITHUB_TOKEN: ${{ github.token }}` in its `env`. Matrix replicas
|
|
of one job pass a `key` so their comments stay apart, and an `e2e explore` run
|
|
keeps a comment of its own. When the reporter cannot
|
|
post (another CI, a push, a fork's read-only token) it says why in one summary
|
|
row and never changes the run's exit code.
|
|
|
|
Full documentation lives at [e2e.com/docs/github](https://e2e.com/docs/github).
|
|
|
|
## License
|
|
|
|
Apache-2.0
|