File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 # ⚠️ See your package manager's documentation for the correct command to install dependencies in a CI environment.
1717 run : npm ci
1818 - name : Create test results directory
19- run : mkdir -p test-results
19+ run : mkdir -p test-results/chromatic-archives
2020 - name : Run Playwright tests
2121 run : |
2222 # Create Docker config directory to avoid permission warning
@@ -53,10 +53,15 @@ jobs:
5353 with :
5454 name : test-results
5555 path : ./test-results
56+ - name : Create chromatic-archives directory if missing
57+ run : |
58+ mkdir -p ./test-results/chromatic-archives
59+ # List contents to debug
60+ ls -la ./test-results/ || echo "test-results directory is empty or missing"
5661 - name : Run Chromatic
5762 uses : chromaui/action@latest
5863 with :
5964 playwright : true
6065 projectToken : ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
6166 env :
62- CHROMATIC_ARCHIVE_LOCATION : ./test-results
67+ CHROMATIC_ARCHIVE_LOCATION : ./test-results/chromatic-archives
Original file line number Diff line number Diff line change @@ -15,11 +15,17 @@ module.exports = defineConfig({
1515 /* Opt out of parallel tests on CI. */
1616 workers : process . env . CI ? 1 : undefined ,
1717 /* Reporter to use. See https://playwright.dev/docs/test-reporters */
18- reporter : [
19- [ 'html' ] ,
20- [ 'json' , { outputFile : 'test-results/results.json' } ] ,
21- [ 'junit' , { outputFile : 'test-results/junit.xml' } ]
22- ] ,
18+ reporter : process . env . CI
19+ ? [
20+ [ '@chromatic-com/playwright' , { outputDir : 'test-results/chromatic-archives' } ] ,
21+ [ 'json' , { outputFile : 'test-results/results.json' } ] ,
22+ [ 'junit' , { outputFile : 'test-results/junit.xml' } ]
23+ ]
24+ : [
25+ [ 'html' ] ,
26+ [ 'json' , { outputFile : 'test-results/results.json' } ] ,
27+ [ 'junit' , { outputFile : 'test-results/junit.xml' } ]
28+ ] ,
2329 /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
2430 use : {
2531 /* Base URL to use in actions like `await page.goto('/')`. */
You can’t perform that action at this time.
0 commit comments