Update cluster concurrency to use Cluster.CONCURRENCY_CONTEXT #5
This file contains 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: Build | |
on: | |
pull_request: | |
branches: | |
- '*' | |
types: | |
- opened | |
- synchronize | |
- reopened | |
push: | |
branches: | |
- '*' | |
release: | |
types: [created] | |
jobs: | |
test: | |
name: node v${{ matrix.node }}, pptr ${{ matrix.puppeteer_version }}, ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: | |
- 18 # Make sure the Node.js version is compatible with Puppeteer. | |
puppeteer_version: | |
- 22.3.0 | |
os: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Install specific Puppeteer version | |
run: npm install puppeteer@${{ matrix.puppeteer_version }} | |
- name: Run tests and collect coverage | |
run: | | |
npm run coverage | |
- name: Collect coverage | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: run_node-v${{ matrix.node }}_pptr-${{ matrix.puppeteer_version }}_os-${{ matrix.os }} | |
parallel: true | |
report-coverage: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Report coverage | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
publish: | |
if: github.event_name == 'release' && github.event.action == 'created' | |
needs: report-coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
registry-url: https://registry.npmjs.org/ | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Build and publish | |
run: | | |
npm run build | |
npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_GITHUB_TOKEN }} |