.github/workflows/build.yml
name: Build
on:
push:
branches:
- '**'
tags-ignore:
- '**'
jobs:
tests:
name: Tests
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout the repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install NPM dependencies
run: npm ci
- name: Run types check
run: npm run type-check
- name: Run linter
run: npm run lint
- name: Run coverage
run: npm run coverage
- name: Run the packaging
run: npm run package
- name: Report coverage to CodeClimate
uses: paambaati/codeclimate-action@v3.0.0
if: ${{ github.ref == 'refs/heads/master' }}
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
debug: true
coverageCommand: npm run coverage