Skip to content

Commit d0e489f

Browse files
committed
chore: migrate to chromatic for CI testing
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
1 parent 769e064 commit d0e489f

4 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/playwright.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,18 @@ jobs:
1717

1818
steps:
1919
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
20+
with:
21+
fetch-depth: 0
2022
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 #v5
2123
with:
2224
node-version: 22
2325

2426
- name: Install dependencies
2527
run: |
2628
yarn install --frozen-lockfile
27-
yarn add -D @playwright/test@latest
28-
npx playwright install --with-deps
29+
yarn add -D @playwright/test chromatic @chromatic-com/playwright
2930
3031
- name: Run Playwright tests
31-
run: npx playwright test
32+
run: yarn chromatic --playwright --project-token="$CHROMATIC_PROJECT_TOKEN"
33+
env:
34+
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}

scorecards-site/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ To run tests locally, you must install Playwright manually and avoid committing
3737
### Temporary local installation
3838

3939
```sh
40-
yarn add -D @playwright/test@latest
41-
yarn playwright install --with-deps
40+
yarn add -D @playwright/test chromatic @chromatic-com/playwright
4241
```
4342

4443
These changes are temporary and should not be committed.

scorecards-site/tests-e2e/home.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
import path from 'path'
33
import fs from 'fs'
4-
import { test, expect } from '@playwright/test'
4+
import { test, expect } from '@chromatic-com/playwright'
55

66
const mockRepoDataPath = path.resolve(
77
__dirname,

scorecards-site/tests-e2e/viewer.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22
import path from 'path'
33
import fs from 'fs'
4-
import { test, expect } from '@playwright/test'
4+
import { test, expect } from '@chromatic-com/playwright'
55

66
const mockScorecardDataPath = path.resolve(
77
__dirname,

0 commit comments

Comments
 (0)