@@ -91,15 +91,43 @@ jobs:
9191 bun run --filter landing build
9292 - name : Install Playwright Browsers
9393 run : bunx playwright install chromium --with-deps
94+ - name : Check for Existing E2E Snapshots
95+ id : check-snapshots
96+ run : |
97+ SNAPSHOT_COUNT=$(find e2e -name '*.png' -path '*-snapshots/*' 2>/dev/null | wc -l)
98+ echo "count=$SNAPSHOT_COUNT" >> $GITHUB_OUTPUT
99+ echo "Found $SNAPSHOT_COUNT existing snapshot(s)"
100+ - name : Generate E2E Snapshots
101+ if : steps.check-snapshots.outputs.count == '0'
102+ run : bunx playwright test --update-snapshots
103+ - name : Commit E2E Snapshots
104+ if : steps.check-snapshots.outputs.count == '0' && github.event_name == 'pull_request'
105+ uses : stefanzweifel/git-auto-commit-action@v5
106+ with :
107+ commit_message : " chore: generate e2e visual snapshots from CI"
108+ file_pattern : " e2e/**/*-snapshots/*.png"
94109 - name : Run E2E Tests
95110 run : bun run test:e2e
96111 - name : Upload artifact
97- uses : actions/upload-pages-artifact@v3
98- with :
99- path : ./apps/landing/out
100- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
101- - uses : actions/deploy-pages@v4
102- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
112+ uses : actions/upload-pages-artifact@v3
113+ with :
114+ path : ./apps/landing/out
115+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
116+ - uses : actions/deploy-pages@v4
117+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
118+ - name : Build Landing (singleCss)
119+ run : |
120+ rm -rf apps/landing/out apps/landing/.next apps/landing/df
121+ DEVUP_SINGLE_CSS=1 bun run --filter landing build
122+ - name : Run E2E Tests (singleCss)
123+ run : bun run test:e2e
124+ - name : Upload singleCss Playwright Report
125+ uses : actions/upload-artifact@v4
126+ if : ${{ !cancelled() }}
127+ with :
128+ name : playwright-report-singlecss
129+ path : playwright-report/
130+ retention-days : 30
103131 - name : Upload to codecov.io
104132 uses : codecov/codecov-action@v5
105133 with :
0 commit comments