BAU: Bump vitest from 4.0.18 to 4.1.0 #20
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: PR check | |
| on: | |
| pull_request: | |
| types: | |
| - opened | |
| - reopened | |
| - ready_for_review | |
| - synchronize | |
| jobs: | |
| pre-commit: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Pre-commit checks | |
| uses: govuk-one-login/github-actions/code-quality/run-pre-commit@3b0015c58dd0e19e1572fda59dda4184df387d1e | |
| with: | |
| package-manager: 'npm' | |
| install-dependencies: 'true' | |
| all-files: 'true' | |
| type-check: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Node | |
| uses: ./.github/actions/node-setup | |
| - name: Type check | |
| run: npm run type-check | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| needs: type-check | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # required for sonar | |
| - name: Setup Node | |
| uses: ./.github/actions/node-setup | |
| - name: Unit tests | |
| run: npm run test:coverage | |
| - name: Sonar scan # runs after unit tests in order to consume coverage report | |
| if: ${{ github.actor != 'dependabot[bot]' }} | |
| uses: SonarSource/sonarqube-scan-action@v7.0.0 | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| merge-status: | |
| runs-on: ubuntu-latest | |
| needs: [pre-commit, type-check, unit-tests] | |
| if: always() | |
| steps: | |
| - run: | | |
| failed=() | |
| [[ "${{ needs.pre-commit.result }}" != "success" ]] && failed+=("pre-commit") | |
| [[ "${{ needs.type-check.result }}" != "success" ]] && failed+=("type-check") | |
| [[ "${{ needs.unit-tests.result }}" != "success" ]] && failed+=("unit-tests") | |
| if [[ ${#failed[@]} -gt 0 ]]; then | |
| echo "The following jobs failed: ${failed[*]}" | |
| exit 1 | |
| fi |