-
Notifications
You must be signed in to change notification settings - Fork 155
Adding codecov uploading to github and buildkite with monorepo flags #1146
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
ecd945c
Adding codecov uploading to github and buildkite with monorepo flags
MichaelGHSeg afaebf3
Trying command line arguments
MichaelGHSeg 84c63f7
Another attempt
MichaelGHSeg ae3de32
Using segment codecov uploader possibly?
MichaelGHSeg 46af2c2
Excepting backwards compatibility test from coverage due to jest errors
MichaelGHSeg 080ed23
Fixing logic from local testing
MichaelGHSeg 8127448
Merge branch 'master' of ssh://github.com/segmentio/analytics-next in…
MichaelGHSeg 8a5a241
Specifying directory per package and using buildkite for upload
MichaelGHSeg 3a2ba14
More codecov fixes
MichaelGHSeg 24d4645
Changing how coverage is initialized
MichaelGHSeg 18d56dd
Adding an intiial codecov config
MichaelGHSeg cdec797
Updating *cough* old browser coverage thresholds
MichaelGHSeg c0a1473
removing custom buildkite image
MichaelGHSeg dc649b0
Adding new standard image.
MichaelGHSeg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,9 @@ steps: | |
| - exit_status: '*' | ||
| limit: 2 | ||
| plugins: | ||
| - joscha/codecov#v3.1.0: | ||
| args: | ||
| - '-F browser' | ||
| - ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0: | ||
| key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" | ||
| paths: ['.yarn/cache/'] | ||
|
|
@@ -95,6 +98,9 @@ steps: | |
| - yarn run -T core test | ||
| - yarn turbo run --filter=core-integration-tests lint | ||
| plugins: | ||
| - joscha/codecov#v3.1.0: | ||
| args: | ||
| - '-F core' | ||
| - ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0: | ||
| key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" | ||
| paths: ['.yarn/cache/'] | ||
|
|
@@ -128,6 +134,9 @@ steps: | |
| - echo "+++ Run Tests" | ||
| - yarn turbo run --filter='./packages/consent/*' test | ||
| plugins: | ||
| - joscha/codecov#v3.1.0: | ||
| args: | ||
| - '-F consent' | ||
| - ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0: | ||
| key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" | ||
|
|
||
|
|
@@ -145,6 +154,9 @@ steps: | |
| - echo "+++ Run Tests" | ||
| - yarn turbo run --filter='./packages/signals/*' test | ||
| plugins: | ||
| - joscha/codecov#v3.1.0: | ||
| args: | ||
| - '-F signals' | ||
| - ssh://[email protected]/segmentio/cache-buildkite-plugin#v2.0.0: | ||
| key: "v1.1-cache-dev-{{ checksum 'yarn.lock' }}" | ||
| paths: ['.yarn/cache/'] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes some spurrious validation warnings. I didn't see a definitive answer about whether a new jest version would solve it. We can add --coverage to the test command lines instead
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this --
Observations on this config:
on Buildkite/CI, when
yarn run -T core testis run -- the coverage directory is in the packages/core. I am not sure that codecov can handle a bunch of individual "coverage" folders like that, or it can only handle one big honking coverage folder. Sticking with this pattern would be ideal.We also support running
yarn test --coverageat the monorepo root (which is a currently not a command we run on CI) which runs the test suite on every package -- and creates an aggregated coverage folder. We only don't do this on CI because we like having the CI steps be more atomic (test core, test browser, etc) -- it also is more flexible in the future if want to power up turborepo with distributed build caching.I'm still kinda on the fence about whether we or not we should use the CI env variable for coverage, or whether that's confusing and we use the new COVERAGE env variable. (or ditch the process.env.CI and just run with --coverage, or, all three). There's too many ways to do this ;-)