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 Codecov deprecated-components flags #6697

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
20 changes: 20 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,23 @@ 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
carryforward: true
statuses:
- type: project
target: 80%
- type: patch
target: auto
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ jobs:
run: yarn
- name: CI build checks
run: yarn ci-check:build
- codecov/upload:
flags: exclude_deprecated

format:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -117,6 +119,14 @@ 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 }}
with:
flags: exclude_deprecated
- name: CI snapshot tests for c4p
run: yarn ci-check:test:c4p:snapshot
test-c4p-wc:
Expand All @@ -139,6 +149,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