AndrewWalsh/at-your-service

View on GitHub
.github/workflows/node.js.yml

Summary

Maintainability
Test Coverage
name: build
on:
  push:
    branches:
      - main
    tags:
      - "!*"
  pull_request:
    paths:
      - "!*.MD"
jobs:
  test:
    strategy:
      matrix:
        platform: [ubuntu-latest]
        node: ["18"]
    name: test/node ${{ matrix.node }}/${{ matrix.platform }}
    runs-on: ${{ matrix.platform }}
    steps:
      - uses: actions/checkout@main
      - uses: actions/setup-node@main
        with:
          node-version: ${{ matrix.node }}
      - run: npm ci
      - run: npm run build
      - run: npm run test
  coverage:
    needs: [test]
    name: coverage
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@main
      - uses: actions/setup-node@main
        with:
          node-version: "18"
      - run: npm ci
      - run: npm run build
      - uses: paambaati/codeclimate-action@v3.2.0
        env:
          CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
        with:
          coverageCommand: npm run test:coverage
          debug: true