X1536 freeze thaw #2992
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
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | |
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
| name: Test | |
| on: | |
| push: | |
| branches: [devel] | |
| pull_request: | |
| branches: [devel] | |
| # Cancel in-progress runs on the same PR when a new push arrives. | |
| # On pushes to devel, queue runs instead of cancelling so each commit gets a status. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build: | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip tests]') | |
| name: Build app for cypress | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn --frozen-lockfile --silent | |
| - name: Build | |
| run: yarn build | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build | |
| path: build | |
| retention-days: 1 | |
| cypress: | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip tests]') | |
| name: Run cypress tests (${{ matrix.containers }}/4) | |
| needs: build | |
| runs-on: ubuntu-latest | |
| container: | |
| image: cypress/browsers:22.14.0 | |
| options: --user 1001 --ipc=host | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| containers: [1, 2, 3, 4] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| name: Checkout | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: build | |
| path: build | |
| - name: Cypress run | |
| uses: cypress-io/github-action@v7 | |
| env: | |
| SPLIT: ${{ strategy.job-total }} | |
| SPLIT_INDEX: ${{ strategy.job-index }} | |
| with: | |
| install: false | |
| start: npx serve -s build -p 3000 --no-request-logging | |
| wait-on: "http://localhost:3000" | |
| config: baseUrl=http://localhost:3000 | |
| browser: chrome | |
| # store any screenshots of the failing tests as artifacts | |
| - uses: actions/upload-artifact@v7 | |
| if: failure() | |
| with: | |
| overwrite: true | |
| name: cypress-screenshots-${{ matrix.containers }} | |
| path: cypress/screenshots | |
| jest: | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip tests]') | |
| name: Run unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Run jest tests | |
| run: yarn test:unit | |
| prettier: | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip tests]') | |
| name: Check format with prettier | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Run prettier | |
| run: yarn prettier --check . | |
| eslint: | |
| if: github.event_name != 'push' || !contains(github.event.head_commit.message, '[skip tests]') | |
| name: Lint with ESLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: '.nvmrc' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install | |
| - name: Lint using ESLint | |
| run: yarn lint |