Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Track breakage and compatibility coverage with Codecov #1345

Merged
merged 7 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 30 additions & 4 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,24 @@ coverage:
range: 80...100
status:
project:
default: false
source:
paths:
- src/
default:
target: 95%
flags:
- e2e-MacOS
- e2e-Ubuntu
- e2e-Windows
- integration-MacOS
- integration-Ubuntu
- integration-Windows
relaxed:
target: 10%
flags:
- breakage
- compatibility
strict:
target: 100%
flags:
- unit

comment:
layout: diff, flags, files
Expand All @@ -19,6 +33,18 @@ comment:
require_head: yes

flags:
breakage:
carryforward: true
paths:
- src/
- index.js
- testing.js
compatibility:
carryforward: true
paths:
- src/
- index.js
- testing.js
e2e-MacOS:
carryforward: true
paths:
Expand Down
24 changes: 21 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,14 @@ jobs:
actions-results-receiver-production.githubapp.com:443
api.github.com:443
artifactcache.actions.githubusercontent.com:443
codecov.io:443
github.com:443
gitlab.com:443
nodejs.org:443
objects.githubusercontent.com:443
registry.npmjs.org:443
storage.googleapis.com:443
uploader.codecov.io:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Node.js
Expand All @@ -251,6 +254,12 @@ jobs:
run: npm clean-install
- name: Run breakage tests
run: npm run coverage:breakage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ failure() || success() }}
with:
file: ./_reports/coverage/breakage/lcov.info
flags: breakage
test-compatibility:
name: Compatibility
runs-on: ubuntu-22.04
Expand All @@ -276,11 +285,14 @@ jobs:
actions-results-receiver-production.githubapp.com:443
api.github.com:443
artifactcache.actions.githubusercontent.com:443
codecov.io:443
github.com:443
gitlab.com:443
nodejs.org:443
objects.githubusercontent.com:443
registry.npmjs.org:443
storage.googleapis.com:443
uploader.codecov.io:443
- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
- name: Install Node.js
Expand All @@ -298,6 +310,12 @@ jobs:
name: index-common-js
- name: Run compatibility tests
run: npm run coverage:compat --ignore-scripts
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ matrix.node-version == '20.0.0' }}
with:
file: ./_reports/coverage/compat/lcov.info
flags: compatibility
test-e2e:
name: End-to-end (${{ matrix.name }})
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -351,7 +369,7 @@ jobs:
run: npm run coverage:e2e
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ always() }}
if: ${{ failure() || success() }}
with:
file: ./_reports/coverage/e2e/lcov.info
flags: e2e-${{ matrix.name }}
Expand Down Expand Up @@ -409,7 +427,7 @@ jobs:
run: npm run coverage:integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ always() }}
if: ${{ failure() || success() }}
with:
file: ./_reports/coverage/integration/lcov.info
flags: integration-${{ matrix.name }}
Expand Down Expand Up @@ -544,7 +562,7 @@ jobs:
run: npm run coverage:unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
if: ${{ always() }}
if: ${{ failure() || success() }}
with:
file: ./_reports/coverage/unit/lcov.info
flags: unit
Expand Down