Skip to content

Commit

Permalink
Adding Codecov (#17304)
Browse files Browse the repository at this point in the history
* feat: added codecov

* fix: changed target to auto

* fix: added func to test

* fix: removed test code

* fix: changed version to [email protected]

* fix: changed the version to a SHA

* fix: changed codecov.yml

* fix: changes the codecov.yml to match the website report

* fix: yarn dedupe

---------

Co-authored-by: Taylor Jones <[email protected]>
  • Loading branch information
guidari and tay1orjones authored Sep 11, 2024
1 parent 581aee8 commit 3e92444
Show file tree
Hide file tree
Showing 29 changed files with 151 additions and 107 deletions.
62 changes: 62 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
coverage:
status:
project:
default:
informational: true
patch:
default:
informational: true

component_management:
default_rules: # default rules that will be inherited by all components
statuses:
- type: project # in this case every component that doens't have a status defined will have a project type one
target: auto
threshold: 1%
branches:
- '!main'
individual_components:
- component_id: colors
name: colors
paths:
- ../packages/colors/**
- component_id: feature-flags
name: feature-flags
paths:
- ../packages/feature-flags/**
- component_id: icon-build-helpers
name: icon-build-helpers
paths:
- ../packages/icon-build-helpers/**
- component_id: layout
name: layout
paths:
- ../packages/layout/**
- component_id: motion
name: motion
paths:
- ../packages/motion/**
- component_id: react # this is an identifier that should not be changed
name: react # this is a display name, and can be changed freely
paths:
- ../packages/react/**
- component_id: scss-generator
name: scss-generator
paths:
- ../packages/scss-generator/**
- component_id: test-utils
name: test-utils
paths:
- ../packages/test-utils/**
- component_id: themes
name: themes
paths:
- ../packages/themes/**
- component_id: type
name: type
paths:
- ../packages/type/**
- component_id: upgrade
name: upgrade
paths:
- ../packages/upgrade/**
7 changes: 5 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ jobs:
run: |
yarn carbon-cli check --ignore '**/@(node_modules|examples|components|react|fixtures|compat)/**' 'packages/**/*.scss'
- name: Run tests
run: yarn test --ci

run: yarn test --ci --collectCoverage
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
e2e:
name: 'test:e2e'
runs-on: ubuntu-latest
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 3e92444

Please sign in to comment.