build(deps): bump actions/setup-node from 4 to 6 #1619
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 installation of node dependencies, cache/restore them, 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: Pull Request Prerequisite Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| env: | |
| RETENTION_DAYS: 7 | |
| permissions: | |
| contents: read | |
| jobs: | |
| get-playwright-version: | |
| name: "Get Playwright Version" | |
| runs-on: ubuntu-latest | |
| outputs: | |
| version: ${{ steps.get-version.outputs.version }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Get Playwright version | |
| id: get-version | |
| run: | | |
| VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])") | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "Using Playwright version: $VERSION" | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Derive appropriate SHAs for base and head for `nx affected` commands | |
| uses: nrwl/nx-set-shas@v4 | |
| with: | |
| main-branch-name: ${{ github.base_ref }} | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node-step | |
| with: | |
| npm-auth-token: ${{ secrets.NPM_TOKEN }} | |
| - name: Cache npm dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.npm | |
| key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-npm- | |
| - name: Build app | |
| run: npm run affected:build | |
| - name: Check Formatting | |
| run: npm run format:check | |
| - name: Unit test | |
| run: npm run affected:test | |
| - name: Check Linting | |
| run: npm run affected:lint | |
| playwright: | |
| name: "Playwright Tests" | |
| runs-on: ubuntu-latest | |
| needs: get-playwright-version | |
| container: | |
| image: mcr.microsoft.com/playwright:v${{ needs.get-playwright-version.outputs.version }} | |
| env: | |
| HOME: /root | |
| strategy: | |
| matrix: | |
| test: ['sndbx-ci', 'mocks', 'responsive', 'a11y'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: ./.github/actions/node-step | |
| with: | |
| npm-auth-token: ${{ secrets.NPM_TOKEN }} | |
| - name: Cache Playwright browsers | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-playwright-${{ needs.get-playwright-version.outputs.version }} | |
| - name: Install browsers | |
| run: npx playwright install --with-deps chromium firefox webkit | |
| shell: bash | |
| - name: Run Playwright e2e tests ${{ matrix.test }} | |
| run: npm run e2e-test-${{ matrix.test }} | |
| - name: Generate Allure Report | |
| run: npm run report-generate | |
| - name: Upload Playwright Report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: playwright-report-${{ matrix.test }} | |
| path: reports/html-report/ | |
| retention-days: ${{ env.RETENTION_DAYS }} | |
| - name: Upload Allure Report | |
| if: ${{ !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: allure-report-${{ matrix.test }} | |
| path: allure-report/ | |
| retention-days: ${{ env.RETENTION_DAYS }} | |
| - name: Upload Accessibility Reports | |
| if: ${{ matrix.test == 'a11y' && !cancelled() }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: accessibility-report | |
| path: reports/accessibility-reports/ | |
| retention-days: ${{ env.RETENTION_DAYS }} |