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

feat: adds deprecated flags to codecov #6580

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
21 changes: 21 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,24 @@ component_management:
name: ibm-products-web-components
paths:
- ../packages/ibm-products-web-components/**

flag_management:
default_rules: # the rules that will be followed for any flag added, generally
carryforward: true
statuses:
- type: project
target: auto
threshold: 1%
- type: patch
target: 80%
individual_flags:
- name: exclude_deprecated #custom flag name to view the project coverage without deprecated components
paths:
- '../packages/ibm-products/src/components/**/*.deprecated.test.js' #fill in your own path. Note, accepts globs, not regexes
- '../packages/ibm-products/src/components/**/*.deprecated.test.ts' #fill in your own path. Note, accepts globs, not regexes
carryforward: true
statuses:
- type: project
target: 20%
- type: patch
target: 100%
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,12 @@ jobs:
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: CI tests for c4p excluding deprecated components
run: yarn test:c4p-exclude-deprecated --collectCoverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: CI snapshot tests for c4p
run: yarn ci-check:test:c4p:snapshot
test-c4p-wc:
Expand All @@ -139,6 +145,10 @@ jobs:
run: yarn
- name: CI tests for products web components
run: yarn ci-check:test:c4p-wc
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

avt-runner:
strategy:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"test:c4p:snapshot": "yarn test:c4p-styles styles -u",
"test:c4p-styles": "lerna run --stream --scope @carbon/ibm-products-styles test --",
"test:c4p-wc": "yarn playwright install && lerna run --stream --scope @carbon/ibm-products-web-components test --",
"test:c4p-exclude-deprecated": "yarn test:c4p --testPathIgnorePatterns='\\.deprecated\\.test\\.js$' --",
"spellcheck": "cspell '**' -e './examples' --gitignore --quiet --no-must-find-files",
"storybook": "yarn storybook:start",
"storybook:build": "run-s -s 'storybook:build:*'",
Expand Down
Loading
Loading