Code Coverage Summary #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Coverage | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
name: Jest Coverage on Node ${{ matrix.node-version }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Jest Tests with Coverage | |
run: npm test -- --coverage | |
- name: Code Coverage Report | |
uses: irongut/[email protected] | |
with: | |
filename: "coverage/**/cobertura-coverage.xml" | |
badge: true | |
fail_below_min: true | |
format: markdown | |
hide_branch_rate: false | |
hide_complexity: true | |
indicators: true | |
output: both | |
thresholds: "60 80" | |
- name: Upload Coverage Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: coverage-report-node-${{ matrix.node-version }} | |
path: coverage/ |