Action for testing projects
make setupmake buildTests inside the Docker container should write artifacts (screenshots, traces, HTML reports) to /project/tmp/artifacts/.
The project's docker-compose.yml must mount the source directory to /project:
services:
app:
volumes:
- .:/project
working_dir: /projectAfter tests finish, the action automatically uploads everything under /project/tmp/artifacts/ as a test-results GitHub Actions artifact. Students download it and open playwright-report/index.html locally.
Example playwright.config.js:
export default defineConfig({
outputDir: '/project/tmp/artifacts/traces',
reporter: [['html', { outputFolder: '/project/tmp/artifacts/playwright-report', open: 'never' }]],
use: {
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
},
});This repository is created and maintained by the team and the community of Hexlet, an educational project. Read more about Hexlet.
See most active contributors on hexlet-friends.
