chore: update the dependency cache key #79
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: Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| branches: | |
| - main | |
| - develop | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| jobs: | |
| install: | |
| name: 'install' | |
| runs-on: ubuntu-latest | |
| outputs: | |
| integration-matrix: ${{ steps.discover.outputs.integration }} | |
| e2e-matrix: ${{ steps.discover.outputs.e2e }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Cache dependencies | |
| id: dependencies-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Install dependencies | |
| if: steps.dependencies-cache.outputs.cache-hit != 'true' | |
| run: pnpm install | |
| - name: Discover test packages | |
| id: discover | |
| run: node --experimental-strip-types .github/scripts/discover-test-packages.ts | |
| build: | |
| needs: [install] | |
| name: 'build' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Restore dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Cache build outputs | |
| id: build-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| packages/*/dist | |
| apps/*/dist | |
| key: ${{ runner.os }}-build-${{ hashFiles('pnpm-lock.yaml', 'packages/**', 'apps/**') }} | |
| - name: Run build | |
| if: steps.build-cache.outputs.cache-hit != 'true' | |
| run: pnpm run build | |
| lint: | |
| needs: [install, build] | |
| name: 'lint' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Restore dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Run linting | |
| run: pnpm run lint | |
| typescript: | |
| needs: [install, build] | |
| name: 'typescript' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Restore dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Restore build outputs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| packages/*/dist | |
| apps/*/dist | |
| key: ${{ runner.os }}-build-${{ hashFiles('pnpm-lock.yaml', 'packages/**', 'apps/**') }} | |
| - name: Run TypeScript checks | |
| run: pnpm run check-types | |
| test-integration: | |
| needs: [install, build, lint, typescript] | |
| name: 'test:integration (${{ matrix.name }})' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.install.outputs.integration-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Restore dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Restore build outputs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| packages/*/dist | |
| apps/*/dist | |
| key: ${{ runner.os }}-build-${{ hashFiles('pnpm-lock.yaml', 'packages/**', 'apps/**') }} | |
| - name: Run integration tests | |
| run: pnpm --filter='${{ matrix.package }}' run test:integration | |
| test-e2e: | |
| needs: [install, build, lint, typescript] | |
| name: 'test:e2e (${{ matrix.name }})' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.install.outputs.e2e-matrix) }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.18.1 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: 'pnpm' | |
| - name: Restore dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| node_modules | |
| apps/*/node_modules | |
| packages/*/node_modules | |
| ~/.cache/ms-playwright | |
| key: ${{ runner.os }}-dependencies-${{ hashFiles('pnpm-lock.yaml') }} | |
| - name: Restore build outputs | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| packages/*/dist | |
| apps/*/dist | |
| key: ${{ runner.os }}-build-${{ hashFiles('pnpm-lock.yaml', 'packages/**', 'apps/**') }} | |
| - name: Run e2e tests | |
| run: pnpm --filter='${{ matrix.package }}' run test:e2e | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ !cancelled() }} | |
| with: | |
| name: playwright-report-${{ matrix.name }} | |
| path: '**/playwright-report/' | |
| retention-days: 30 |