Prefinem/nativemodels

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: ci

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [14.x, 16.x, 18.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 and test
        run: |
          npm i
          npm test
        env:
          CI: true
  codecov:
    needs: build
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - name: npm install and build test coverage
        run: |
          npm i
          npm test -- --coverage
      - name: Codecov
        uses: codecov/codecov-action@v1
        with:
          name: Prefinem
          token: ${{ secrets.CODECOV_TOKEN }}
          file: coverage/lcov.info
          # Flag upload to group coverage metrics (e.g. unittests | integration | ui,chrome)
          # flags: # optional
          # Specify the location of the .codecov.yml config file
          # yml: # optional
  codeclimate:
    needs: build
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@master
      - name: npm install
        run: npm i
      - name: Code Climate
        uses: paambaati/codeclimate-action@v2.7.5
        env:
          CC_TEST_REPORTER_ID: ba0c56fa431a41c03cc4e706268941c6c9f14262626e73321d980e6ef22a2784
        with:
          coverageCommand: npm test -- --coverage
          debug: true