.github/workflows/ci.yaml
name: CI
on:
push:
branches:
- main
- feat/*
pull_request:
branches:
- main
jobs:
ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 15.x, 16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: npm install
run: npm ci
- name: Lint Code
run: npm run lint
- name: Unit Tests
run: npm run test
- name: Publish Codecov
uses: codecov/codecov-action@v1
- name: Publish Code Climate
uses: paambaati/codeclimate-action@v2.7.5
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
- name: Audit dependencies (all)
run: npm run audit
continue-on-error: true
- name: Audit dependencies (prod only)
run: npm run audit --production