forked from foundationdb-rs/foundationdb-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request foundationdb-rs#191 from foundationdb-rs/189-fix-c…
…overage-ci 189 fix coverage ci
- Loading branch information
Showing
5 changed files
with
80 additions
and
62 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -133,58 +133,6 @@ jobs: | |
- name: Clippy | ||
run: cargo clippy --features num-bigint,embedded-fdb-include,tenant-experimental,fdb-7_3 --no-default-features | ||
|
||
coverage: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CARGO_INCREMENTAL: "0" | ||
RUST_BACKTRACE: 1 | ||
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install FoundationDB | ||
uses: foundationdb-rs/[email protected] | ||
with: | ||
version: "7.3.27" | ||
|
||
- name: Enable tenant | ||
run: fdbcli --exec "configure single memory tenant_mode=optional_experimental" | ||
|
||
- uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: nightly | ||
|
||
- name: Build bindingtester | ||
run: cargo build -p bindingtester --target x86_64-unknown-linux-gnu | ||
|
||
- name: Test | ||
# doc tests are disabled fow now as they do not compile with -Cpanic=abort | ||
run: cargo test -p foundationdb --tests --no-fail-fast --target x86_64-unknown-linux-gnu --features=num-bigint,embedded-fdb-include,tenant-experimental,fdb-7_3 | ||
|
||
- name: Setup bindingtester | ||
run: scripts/setup_bindingtester.sh target/x86_64-unknown-linux-gnu/debug/bindingtester | ||
|
||
- name: Run bindingtester | ||
run: scripts/run_bindingtester.sh 50 | ||
|
||
- id: coverage | ||
uses: actions-rs/[email protected] | ||
|
||
- name: Coveralls upload | ||
uses: coverallsapp/github-action@master | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ${{ steps.coverage.outputs.report }} | ||
|
||
- name: Codecov upload | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ${{ steps.coverage.outputs.report }} | ||
|
||
audit: | ||
name: Cargo audit | ||
runs-on: ubuntu-latest | ||
|
This file contains 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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Coverage | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
codecov: | ||
name: Code coverage | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
CARGO_INCREMENTAL: "0" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install FoundationDB | ||
uses: foundationdb-rs/[email protected] | ||
with: | ||
version: "7.3.27" | ||
|
||
- name: Enable tenant | ||
run: fdbcli --exec "configure single memory tenant_mode=optional_experimental" | ||
|
||
- name: Install Rust | ||
run: rustup update stable | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
|
||
- name: Install Rust | ||
run: rustup update stable | ||
|
||
- name: llvm-cov show-env | ||
run: cargo llvm-cov show-env --export-prefix | ||
|
||
- name: Build bindingTester | ||
run: source <(cargo llvm-cov show-env --export-prefix) && cargo build -p bindingtester | ||
|
||
- name: Test main crate | ||
run: source <(cargo llvm-cov show-env --export-prefix) && cargo test -p foundationdb --tests --no-fail-fast --features=num-bigint,embedded-fdb-include,tenant-experimental,fdb-7_3 | ||
|
||
- name: Setup bindingtester | ||
run: scripts/setup_bindingtester.sh target/debug/bindingtester | ||
|
||
- name: Run bindingtester | ||
run: source <(cargo llvm-cov show-env --export-prefix) && scripts/run_bindingtester.sh 50 | ||
|
||
- name: Generate code coverage | ||
run: source <(cargo llvm-cov show-env --export-prefix) && cargo llvm-cov report --lcov --output-path lcov.info | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: lcov.info | ||
fail_ci_if_error: true |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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