Increase delay time in dev test to fix CI fail #13
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| env: | |
| # Always try to output colored text. | |
| FORCE_COLOR: 1 | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: lts/* | |
| cache: pnpm | |
| # Put Chrome installed by Puppeteer inside the pnpm store so it gets | |
| # cached. | |
| - name: Set PUPPETEER_CACHE_DIR | |
| shell: bash | |
| run: echo "PUPPETEER_CACHE_DIR=$(pnpm store path)" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: pnpm install | |
| # Install Chrome even if it's not needed for this job so it can be cached | |
| # for other jobs. | |
| - name: Install Chrome | |
| run: pnpm install-chrome-for-puppeteer | |
| - name: Lint files | |
| run: pnpm lint | |
| test: | |
| name: Test on ${{ matrix.os }} using Node.js v${{ matrix.node }} | |
| needs: lint | |
| continue-on-error: true | |
| strategy: | |
| matrix: | |
| os: [windows-latest, macos-latest, ubuntu-latest] | |
| # This should also include Node.js v20, but snapshot testing is only | |
| # available in Node.js v22.3 or later. | |
| node: [22, 24] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: latest | |
| run_install: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: pnpm | |
| # Put Chrome installed by Puppeteer inside the pnpm store so it gets | |
| # cached. | |
| - name: Set PUPPETEER_CACHE_DIR | |
| shell: bash | |
| run: echo "PUPPETEER_CACHE_DIR=$(pnpm store path)" >> $GITHUB_ENV | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Install Chrome | |
| run: pnpm install-chrome-for-puppeteer | |
| # Prevent `No usable sandbox!` error on Ubuntu. See: | |
| # https://github.com/puppeteer/puppeteer/issues/13595 | |
| - name: Disable AppArmor | |
| if: ${{ matrix.os == 'ubuntu-latest' }} | |
| run: | |
| echo 0 | sudo tee | |
| /proc/sys/kernel/apparmor_restrict_unprivileged_userns | |
| - name: Run tests | |
| run: pnpm test |