.github/workflows/main.yml
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
test:
name: test - Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 16
- 14
- 12
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
coverage:
needs: [ test ]
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@master
with:
node-version: 16
- run: npm ci
- uses: paambaati/codeclimate-action@v3.0.0
env:
CC_TEST_REPORTER_ID: 93d94098c51a079f0e7bff9294f62c2196b9eef559bb81511f2c13e6d9caa28f
with:
coverageCommand: npm run coverage