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

test: Distinguish between coverage from integration and MBT tests #97

Merged
merged 6 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
40 changes: 39 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ on:

jobs:
coverage:
name: Integration
runs-on: ubuntu-latest
defaults:
run:
Expand All @@ -38,12 +39,49 @@ jobs:
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info
run: cargo llvm-cov nextest --workspace --exclude malachite-itf --all-features --lcov --output-path lcov.info
- name: Generate text report
run: cargo llvm-cov report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: Code/lcov.info
flags: integration
fail_ci_if_error: true

mbt-coverage:
name: MBT
runs-on: ubuntu-latest
defaults:
run:
working-directory: Code
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: "18"
- run: npm install -g @informalsystems/quint
- name: Setup Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: llvm-tools-preview
- name: Install cargo-nextest
uses: taiki-e/install-action@cargo-nextest
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov nextest -p malachite-itf --all-features --lcov --output-path lcov.info
- name: Generate text report
run: cargo llvm-cov report
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: Code/lcov.info
flags: mbt
fail_ci_if_error: true
2 changes: 2 additions & 0 deletions Code/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
mbt = "nextest run -p malachite-itf --all-features"
178 changes: 0 additions & 178 deletions Code/itf/src/consensus.rs

This file was deleted.

53 changes: 0 additions & 53 deletions Code/itf/src/deserializers.rs

This file was deleted.

5 changes: 1 addition & 4 deletions Code/itf/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
pub mod consensus;
pub mod votekeeper;

mod deserializers;
pub mod utils;
pub mod votekeeper;
18 changes: 0 additions & 18 deletions Code/itf/tests/consensus.rs

This file was deleted.

This file was deleted.

4 changes: 4 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
codecov:
require_ci_to_pass: yes

# ignore:
# - "Code/itf"
# - "Code/test"

coverage:
precision: 2
round: nearest
Expand Down
Loading