Skip to content

Commit

Permalink
ci: fix with_coverage, isolate not unstable but extra_functional (
Browse files Browse the repository at this point in the history
#4573)

* ci: redefine `with_coverage` step to exclude `integration` tests
* ci: isolate `extra_functional` from `integration` tests

Signed-off-by: Shunkichi Sato <[email protected]>
  • Loading branch information
s8sato authored May 14, 2024
1 parent 1606d08 commit f361dd9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/iroha2-dev-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
if: always()
run: ./scripts/tests/consistency.sh docker-compose

# exclude: client/tests/integration/
with_coverage:
runs-on: [self-hosted, Linux, iroha2]
container:
Expand All @@ -44,7 +45,9 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests, with coverage
run: mold --run cargo test --all-features --workspace --no-fail-fast
run: |
mold --run cargo test --all-features --no-fail-fast --workspace --exclude iroha_client
mold --run cargo test --all-features --no-fail-fast -p iroha_client -- --skip integration
env:
RUSTFLAGS: "-C instrument-coverage"
LLVM_PROFILE_FILE: "iroha-%p-%m.profraw"
Expand All @@ -66,6 +69,8 @@ jobs:
name: lcov.info
path: lcov.info

# include: client/tests/integration/
# exclude: client/tests/integration/extra_functional
integration:
runs-on: [self-hosted, Linux, iroha2]
container:
Expand All @@ -75,11 +80,10 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests, with no-default-features
run: |
mold --run cargo test --test mod --no-default-features -- \
integration:: --skip unstable_network
run: mold --run cargo test --no-default-features --no-fail-fast -p iroha_client integration -- --skip extra_functional

unstable:
# include: client/tests/integration/extra_functional
extra_functional:
runs-on: [self-hosted, Linux, iroha2]
container:
image: hyperledger/iroha2-ci:nightly-2024-04-18
Expand All @@ -88,7 +92,7 @@ jobs:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: mold --run cargo test -p iroha_client --tests --no-default-features unstable_network --quiet
run: mold --run cargo test --no-default-features --no-fail-fast -p iroha_client extra_functional

# Run the job to check that the docker containers are properly buildable
pr-generator-build:
Expand Down
1 change: 0 additions & 1 deletion client/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#[cfg(not(coverage))]
mod integration;
1 change: 0 additions & 1 deletion p2p/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
#[cfg(not(coverage))]
mod integration;

0 comments on commit f361dd9

Please sign in to comment.