Continue migration to CSF Next format #7487
Workflow file for this run
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: Lint & Test | |
| on: | |
| pull_request: # for PRs from forks | |
| push: | |
| branches-ignore: | |
| - 'update-snapshots' | |
| workflow_dispatch: | |
| inputs: | |
| updateSnapshots: | |
| description: 'Update Cypress snapshots' | |
| default: false | |
| type: boolean | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| # Skip `pull_request` runs on local PRs for which `push` runs are already triggered | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
| steps: | |
| - name: Checkout 🏷️ | |
| uses: actions/checkout@v6 | |
| - name: Install ⚙️ | |
| uses: ./.github/actions/install | |
| - name: Lint 🤓 | |
| run: pnpm lint | |
| test: | |
| runs-on: ubuntu-latest | |
| # Skip `pull_request` runs on local PRs for which `push` runs are already triggered | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
| steps: | |
| - name: Checkout 🏷️ | |
| uses: actions/checkout@v6 | |
| - name: Install ⚙️ | |
| uses: ./.github/actions/install | |
| - name: Restore Playwright cache 📌 | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: playwright-${{ runner.os }}-${{ hashFiles('pnpm-lock.yaml') }} | |
| restore-keys: ${{ runner.os }}- | |
| - name: Install Playwright browser ⚙️ | |
| run: pnpm exec playwright install chromium | |
| - name: Set up Python 🕹️ | |
| id: setup-python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: '.python-version' | |
| - name: Restore Poetry installation 📌 | |
| id: poetry | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.local | |
| key: poetry-5 # increment to reset cache | |
| - name: Install Poetry 📜 | |
| if: steps.poetry.outputs.cache-hit != 'true' | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: 2.2.1 | |
| - name: Restore Poetry cache 📌 | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.cache/pypoetry | |
| key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-1 # increment to reset cache | |
| - name: Create Poetry environments 📜 | |
| run: pnpm support:setup | |
| - name: Create sample HDF5 file 🎨 | |
| run: pnpm support:sample | |
| - name: Start h5grove support server 🔌 | |
| run: pnpm support:h5grove & pnpm wait-on http://localhost:8888 -t 1m | |
| - name: Test 👓 | |
| run: pnpm test:headless | |
| - name: Upload debug screenshots on failure 🖼️ | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: vitest | |
| path: packages/app/src/__tests__/__screenshots__/ | |
| packages: | |
| runs-on: ubuntu-latest | |
| # Skip `pull_request` runs on local PRs for which `push` runs are already triggered | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
| steps: | |
| - name: Checkout 🏷️ | |
| uses: actions/checkout@v6 | |
| - name: Install ⚙️ | |
| uses: ./.github/actions/install | |
| - name: Build packages 📦 | |
| run: pnpm packages | |
| e2e: | |
| runs-on: ubuntu-latest | |
| # Skip `pull_request` runs on local PRs for which `push` runs are already triggered | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.fork | |
| steps: | |
| - name: Checkout 🏷️ | |
| uses: actions/checkout@v6 | |
| - name: Install ⚙️ | |
| uses: ./.github/actions/install | |
| - name: Build demo 🛠️ | |
| run: pnpm build | |
| - name: Serve ⚡️ | |
| run: pnpm serve & pnpm wait-on http://localhost:5173 -t 1m | |
| - name: Run Cypress 🌳 | |
| run: pnpm cypress:run --env ${{ inputs.updateSnapshots && 'updateSnapshots=true' || 'requireSnapshots=true' }} --expose takeSnapshots=true | |
| - name: Upload debug screenshots and diffs on failure 🖼️ | |
| uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| name: cypress | |
| path: | | |
| cypress/debug/ | |
| cypress/snapshots/**/__diff_output__/ | |
| cypress/snapshots/**/__received_output__/ | |
| - name: Open PR to update reference snapshots 🎁 | |
| uses: peter-evans/create-pull-request@v8 | |
| if: ${{ inputs.updateSnapshots }} | |
| with: | |
| token: ${{ secrets.USER_TOKEN }} | |
| branch: update-snapshots | |
| delete-branch: true | |
| author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> # https://github.com/peter-evans/create-pull-request/blob/v8/action.yml#L27 | |
| title: 'Update Cypress reference snapshots' | |
| commit-message: 'Update Cypress reference snapshots' |