arlac77/node-symatem

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: CI
'on': push
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version:
          - 14.18.3
          - 16.14.2
    steps:
      - uses: actions/checkout@v3
      - name: Build / Test Node ${{ matrix.node-version }}
        uses: actions/setup-node@v3.1.0
        with:
          node-version: ${{ matrix.node-version }}
          cache: npm
      - run: npm install
      - run: npm run build --if-present
      - run: npm run cover --if-present
      - name: Coveralls Parallel
        uses: coverallsapp/github-action@master
        continue-on-error: true
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          flag-name: run-${{ matrix.test_number }}
          path-to-lcov: build/coverage/lcov.info
          parallel: true
  release:
    needs:
      - test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3.1.0
        with:
          node-version: 16.14.2
          cache: npm
      - run: npm install
      - run: npx semantic-release
        env:
          CI: 'true'
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  finish:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Coveralls Finished
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.GITHUB_TOKEN }}
          path-to-lcov: build/coverage/lcov.info
          parallel-finished: true