.github/workflows/main.yml
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
lint:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- run: npm run lint
test:
name: test - Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 20
- 18
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm
- run: npm ci
- run: npm test
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
cache: npm
- run: npm ci
- uses: paambaati/codeclimate-action@v9.0.0
env:
CC_TEST_REPORTER_ID: 7e3baac52021cf11e7b02830ca4b28d791f5ef70953e7ba288d9be86a813b616
with:
coverageCommand: npm run coverage