Merge pull request #905 from rubyforgood/fix/collection-retriever-flake #1120
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: frontend | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'backend/**' | |
| - '.github/workflows/**' | |
| frontend: | |
| - 'frontend/**' | |
| - '.github/workflows/**' | |
| test-app: | |
| name: Test app | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 7 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: frontend/.nvmrc | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - uses: browser-actions/setup-chrome@v2 | |
| id: setup-chrome | |
| - run: npm ci | |
| working-directory: ./frontend | |
| - run: npm run test | |
| working-directory: ./frontend | |
| env: | |
| CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }} | |
| node-next-test: | |
| # Guards the `engines: node >= 18` range in frontend/package.json. The | |
| # version in frontend/.nvmrc is covered by test-app above. | |
| strategy: | |
| matrix: | |
| node_version: ['18', '20', '24'] | |
| needs: changes | |
| if: ${{ needs.changes.outputs.frontend == 'true' }} | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 7 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node_version }} | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - uses: browser-actions/setup-chrome@v2 | |
| id: setup-chrome | |
| - run: npm ci | |
| working-directory: ./frontend | |
| - run: npm run test | |
| working-directory: ./frontend | |
| env: | |
| CHROME_BIN: ${{ steps.setup-chrome.outputs.chrome-path }} |