Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: playwright

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: make install
- run: make test
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ format:

.PHONY: test
test: install
ifdef CI
npx playwright test --grep-invert "@snapshot"
else
npx playwright test
endif

snapshots: install
npx playwright test --grep "@snapshot"
Expand Down
5 changes: 2 additions & 3 deletions playwright.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ module.exports = defineConfig({
fullyParallel: true,
workers: "100%",
retries: 2,
/** Mismatched screenshots are rewritten and the test passes; commit PNG diffs in git to review. */
updateSnapshots: "changed",
updateSnapshots: process.env.CI ? "none" : "changed",
snapshotPathTemplate: "{testDir}/snapshots/{arg}{ext}",
expect: {
toHaveScreenshot: {
Expand All @@ -28,5 +27,5 @@ module.exports = defineConfig({
url: "http://localhost:8080",
reuseExistingServer: true,
},
reporter: "dot",
reporter: process.env.CI ? "line" : "dot",
});
Loading