diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 0a1c274c..9dbb526b 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -34,11 +34,8 @@ jobs: run: npm run check - name: Run Playwright tests - run: npm test -- --reporter=html + run: npm test - - uses: actions/upload-artifact@v3 - if: ${{ !cancelled() }} - with: - name: playwright-report - path: playwright-report/ - retention-days: 30 + - name: Upload test results + run: npx github-actions-ctrf ctrf/ctrf-report.json + if: always() diff --git a/.gitignore b/.gitignore index 901be75d..922d578e 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,6 @@ target/ pkg/ node_modules/ -/test-results/ -/playwright-report/ -/playwright/.cache/ dist src/style/main.css src/style/main.css.map @@ -13,3 +10,4 @@ public/assets public/layers public/private_layers backend/app.yaml +ctrf diff --git a/package-lock.json b/package-lock.json index bb42c803..bf60a7cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,6 +36,7 @@ "@types/node": "^20.11.17", "@types/uuid": "^9.0.8", "playwright": "^1.41.2", + "playwright-ctrf-json-reporter": "^0.0.18", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.1.2", "sass": "^1.70.0", @@ -3002,6 +3003,12 @@ "node": ">=16" } }, + "node_modules/playwright-ctrf-json-reporter": { + "version": "0.0.18", + "resolved": "https://registry.npmjs.org/playwright-ctrf-json-reporter/-/playwright-ctrf-json-reporter-0.0.18.tgz", + "integrity": "sha512-AjFNpIMKI8zeyaktA2LBphYzy3ffiBjXobBXxEfrVUDov/Z8v5+y9FI0m3cBCr8yauk2brN+Er225vHsZDIu0g==", + "dev": true + }, "node_modules/pmtiles": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/pmtiles/-/pmtiles-3.0.4.tgz", diff --git a/package.json b/package.json index a9416a07..f6040bf8 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "@types/node": "^20.11.17", "@types/uuid": "^9.0.8", "playwright": "^1.41.2", + "playwright-ctrf-json-reporter": "^0.0.18", "prettier": "^3.2.5", "prettier-plugin-svelte": "^3.1.2", "sass": "^1.70.0", diff --git a/playwright.config.js b/playwright.config.js index 929950b7..fde6a56d 100644 --- a/playwright.config.js +++ b/playwright.config.js @@ -6,4 +6,5 @@ export default defineConfig({ port: 8080, reuseExistingServer: !process.env.CI, }, + reporter: [["list"], ["playwright-ctrf-json-reporter", {}]], });