50 lines
1.2 KiB
YAML
50 lines
1.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
- push
|
|
- pull_request
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
node:
|
|
- 10
|
|
- 12
|
|
- 14
|
|
- 16
|
|
os:
|
|
- macOS-latest
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- run: npm install
|
|
- run: npm run lint
|
|
if: matrix.node == 16 && matrix.os == 'ubuntu-latest'
|
|
- run: npm test
|
|
- run:
|
|
echo ::set-output name=job_id::$(node -e
|
|
"console.log(crypto.randomBytes(16).toString('hex'))")
|
|
id: get_job_id
|
|
shell: bash
|
|
- uses: coverallsapp/github-action@v1.1.2
|
|
with:
|
|
flag-name:
|
|
${{ steps.get_job_id.outputs.job_id }} (Node.js ${{ matrix.node }}
|
|
on ${{ matrix.os }})
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
parallel: true
|
|
coverage:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: coverallsapp/github-action@v1.1.2
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
parallel-finished: true
|