fix(advanced): use addArguments('-headless') — Options.headless() was… #31
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: Tests | |
| # PER-8195: explicitly use `pull_request` only. `pull_request_target` is | |
| # forbidden — it checks out attacker-controlled code with full secret access. | |
| on: [push, pull_request] | |
| jobs: | |
| basic: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v1 | |
| with: | |
| node-version: 14 | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.npm | |
| key: v1/${{ runner.os }}/node-14/${{ hashFiles('**/package-lock.lock') }} | |
| restore-keys: v1/${{ runner.os }}/node-14/ | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| advanced: | |
| # PER-8195 advanced example. Runs the advanced suite the same way the | |
| # basic job runs its suite — under Percy with the repo's PERCY_TOKEN. | |
| # No testing-mode coverage gate or external assertion helper (matches master). | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: advanced | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 18 | |
| - name: Install advanced/ dependencies | |
| run: npm install | |
| - name: Run advanced tests | |
| env: | |
| PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
| run: npm run test:advanced |