v12 component rework 33 #1383
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "Chromatic" | |
| on: [pull_request] | |
| jobs: | |
| cypress: | |
| name: Run Cypress for visual regression testing | |
| runs-on: ubuntu-latest | |
| container: | |
| image: cypress/browsers:latest | |
| options: --user 1001 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'pnpm' | |
| - name: Cache Cypress binary | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/Cypress | |
| key: ${{ runner.os }}-cypress-${{ hashFiles('regression-test/package-lock.json') }} | |
| - name: Build InstUI | |
| run: pnpm install --frozen-lockfile && pnpm run bootstrap | |
| - name: Install regression-test dependencies | |
| run: npm ci | |
| working-directory: regression-test | |
| - name: Install Cypress binary | |
| run: npx cypress install | |
| working-directory: regression-test | |
| - name: Run Cypress tests | |
| uses: cypress-io/github-action@v6 | |
| env: | |
| ELECTRON_EXTRA_LAUNCH_ARGS: "--remote-debugging-port=9222" | |
| with: | |
| install: false | |
| build: npm run build | |
| start: npm start | |
| working-directory: regression-test | |
| - name: Upload cypress artifact for chromatic | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results | |
| path: regression-test/cypress/downloads | |
| retention-days: 30 | |
| chromatic: | |
| name: Run Chromatic | |
| needs: cypress | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - name: Build InstUI | |
| run: pnpm install --frozen-lockfile && pnpm run bootstrap | |
| - name: Install regression-test dependencies | |
| run: npm ci | |
| working-directory: regression-test | |
| - name: Download Cypress test results | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: test-results | |
| path: regression-test/cypress/downloads | |
| - name: Run Chromatic | |
| uses: chromaui/action@latest | |
| with: | |
| cypress: true | |
| projectToken: ${{ secrets.CHROMATIC_APP_CODE }} | |
| workingDir: regression-test | |
| env: | |
| CHROMATIC_ARCHIVE_LOCATION: ./cypress/downloads |