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

chore: add aws-cdk-lib/core to codecov #32641

Merged
merged 2 commits into from
Dec 30, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 8 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Build Library
run: npx lerna run build --scope=aws-cdk-lib

- name: Build CLI
run: npx lerna run build --scope=aws-cdk

- name: Run tests
- name: Run Core tests
run: cd packages/aws-cdk-lib && yarn test core

- name: Run CLI tests
run: cd packages/aws-cdk && yarn test

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
directory: packages/aws-cdk/coverage
files: packages/aws-cdk/coverage/cobertura-coverage.xml,packages/aws-cdk-lib/coverage/cobertura-coverage.xml
Copy link
Contributor Author

@iliapolo iliapolo Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer pointing to the expected files because I don't trust codecov's search heuristic.

Note that this won't need another change if we decide to add another submodule (or the entire lib).

fail_ci_if_error: true
flags: suite.unit
token: ${{ secrets.CODECOV_TOKEN }}
7 changes: 5 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ coverage:
default:
# require the overall patch coverage to be at least 95%
target: 95


# https://docs.codecov.com/docs/codecovyml-reference#comment
comment:
Expand All @@ -26,10 +25,14 @@ component_management:
- type: patch
target: 95
individual_components:
- component_id: packages_aws_cdk # identifier that should not be changed
- component_id: packages_aws_cdk # identifier that should not be changed
name: packages/aws-cdk # display name that can change freely
paths:
- packages/aws-cdk/**
- component_id: packages_aws_cdk_lib_core # identifier that should not be changed
name: packages/aws-cdk-lib/core # display name that can change freely
paths:
- packages/aws-cdk-lib/core/**

# https://docs.codecov.com/docs/ignoring-paths
ignore:
Expand Down
2 changes: 2 additions & 0 deletions packages/aws-cdk-lib/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ module.exports = {
testMatch: [
'<rootDir>/**/test/**/?(*.)+(test).ts',
],
coveragePathIgnorePatterns: ['\\.generated\\.[jt]s$', '<rootDir>/.*/test/', '.warnings.jsii.js$', '/node_modules/'],
Copy link
Contributor Author

@iliapolo iliapolo Dec 23, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an override of the base config with a small adjustment to ignoring test files. We need this to ignore files inside aws-cdk-lib/core/test


// Massive parallellism leads to common timeouts
testTimeout: 60_000,

Expand Down
Loading