Comments and uploads code coverage for global reporting
- Call action in your workflow after running tests with coverage report generation:
name: Verify
on: [pull_request]
env:
NODE_VERSION: 16.x
jobs:
build:
name: build
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout Code
uses: actions/checkout@v2.3.4
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v2.4.0
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Verify lint
run: yarn lint
- name: Test
run: yarn test --coverage --coverageReporters="json-summary"
- name: Report Coverage
uses: reside-eng/code-coverage-action@v1.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}