diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 3a886ef..936dccf 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,11 +12,11 @@ on: jobs: build: - runs-on: macos-latest + runs-on: ubuntu-latest strategy: matrix: - node-version: [10.x, 12.x, 14.x, 15.x] + node-version: [12.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -27,10 +27,8 @@ jobs: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run build --if-present - - run: npm test - - - name: Publish Unit Test Results - uses: EnricoMi/publish-unit-test-result-action/composite@v1 - if: always() + #- run: npm test (runs in the coverage step) + - name: coverage + uses: artiomtr/jest-coverage-report-action@v1.3 with: - files: test-results/**/*.xml + github_token: ${{ secrets.COVERAGE_REPORT_TOKEN }} diff --git a/jest.config.js b/jest.config.js index 1998b1c..b7c1bf4 100644 --- a/jest.config.js +++ b/jest.config.js @@ -40,7 +40,14 @@ module.exports = { // ], // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: undefined, + coverageThreshold: { + global: { + branches: 90, + functions: 90, + lines: 90, + statements: 90 + } + }, // A path to a custom dependency extractor // dependencyExtractor: undefined,