-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ci(workflows): Add code coverage reporting for v2 #6884
base: main
Are you sure you want to change the base?
Conversation
Changed Files
|
8e2283a
to
d91b994
Compare
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
a64b93c
to
d2a1842
Compare
d2a1842
to
4873fa2
Compare
CONNECTOR_AUTH_PASSPHRASE: ${{ secrets.CONNECTOR_AUTH_PASSPHRASE }} | ||
CONNECTOR_CREDS_S3_BUCKET_URI: ${{ secrets.CONNECTOR_CREDS_S3_BUCKET_URI}} | ||
DESTINATION_FILE_NAME: "creds.json.gpg" | ||
S3_SOURCE_FILE_NAME: "6f8289a9-6da0-433b-8a24-18d4d7257b7f.json.gpg" |
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.
latest creds:
S3_SOURCE_FILE_NAME: "6f8289a9-6da0-433b-8a24-18d4d7257b7f.json.gpg" | |
S3_SOURCE_FILE_NAME: "aa328308-b34e-41b7-a590-4fe45cfe7991.json.gpg" |
if [[ "$(basename "$PWD")" != "cypress-tests-v2" ]]; then | ||
print_color "yellow" "Changing directory to 'cypress-tests-v2'..." | ||
cd cypress-tests-v2 || { | ||
print_color "red" "ERROR: Directory 'cypress-tests-v2' not found!" |
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.
the only thing that is different here is this part of code when compared to execute_cypress.sh
.
i feel, it is better to pass the directory name as an argument from ci (while keeping cypress-tests
as default) to execute_cypress.sh
instead of having this file.
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.
If everything else in the script remains same, then sure, we can have the directory accepted as a command line arg.
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 did verify. the difference that exist in the entire file is this section of code.
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: stable 2 weeks ago | ||
components: clippy llvm-tools-preview |
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.
We don't need clippy for this job, right?
|
||
- name: Install grcov | ||
if: ${{ env.RUN_TESTS == 'true' }} | ||
uses: baptiste0928/[email protected] |
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.
Use taiki-e/install-action
instead.
@@ -20,6 +20,7 @@ env: | |||
RUN_TESTS: ${{ ((github.event_name == 'pull_request') && (github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name)) || (github.event_name == 'merge_group')}} | |||
DEBUG: cypress:cli | |||
RUST_MIN_STACK: 10485760 | |||
CODECOV_FILE: "lcov.info" |
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.
You can consider setting the environment variable on a per-job basis, for only the job that runs Cypress tests on v2 code.
|
||
For generating code coverage, follow the following steps: | ||
|
||
- Make sure `grcov` and `llvm-tools-preview` are installed |
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.
How are these tools to be installed? Cargo, system package manager, etc.?
Can include cargo
/ rustup
commands if the tools are to be installed with cargo
/ rustup
.
cargo build --package router --bin router --no-default-features --features "${FEATURES}" {{ FLAGS }} | ||
set +x | ||
|
||
alias bb := build_v2 |
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.
We haven't kept any aliases for the v2 related recipes so far...
Not sure what format we should follow for v2 recipes.
if [[ "$(basename "$PWD")" != "cypress-tests-v2" ]]; then | ||
print_color "yellow" "Changing directory to 'cypress-tests-v2'..." | ||
cd cypress-tests-v2 || { | ||
print_color "red" "ERROR: Directory 'cypress-tests-v2' not found!" |
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.
If everything else in the script remains same, then sure, we can have the directory accepted as a command line arg.
Type of Change
Description
Added a CI pipeline that will run cypress tests and generate code coverage reports for v2
Additional Changes
Motivation and Context
Closes #1593
Closes #1587
Closes #1622
Closes #1700
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy