Skip to content

Commit 761aaaf

Browse files
authored
ci: split tests and coverage (#286)
Fixes # ### What Changed? Fireblocks tests don't work for external contributors. This PR splits the test run in the CI into two: "Run Tests" and "Generate Coverage". The idea is to have the first one run without fireblocks, while the second one runs with it and is not required for merge. ### Reviewer Checklist - [ ] New features are tested and documented - [ ] PR updates the changelog with a description of changes - [ ] PR has one of the `changelog-X` labels (if applies) - [ ] Code deprecates any old functionality before removing it
1 parent 7bff6e9 commit 761aaaf

File tree

1 file changed

+24
-8
lines changed

1 file changed

+24
-8
lines changed

.github/workflows/integration.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,27 @@ jobs:
4747
test:
4848
name: Run Tests
4949
runs-on: ubuntu-latest
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v4
53+
54+
- name: Install Rust
55+
uses: dtolnay/rust-toolchain@stable
56+
57+
- name: Cache Rust dependencies
58+
uses: Swatinem/rust-cache@v2
59+
with:
60+
cache-on-failure: true
61+
62+
- name: docker
63+
uses: docker/setup-docker-action@v4
64+
65+
- name: Run tests
66+
run: cargo test --workspace
67+
68+
coverage:
69+
name: Generate Coverage
70+
runs-on: ubuntu-latest
5071
env:
5172
HOLESKY_WS_URL: ${{ secrets.HOLESKY_WS_URL }}
5273
HOLESKY_HTTP_URL: ${{ secrets.HOLESKY_HTTP_URL }}
@@ -58,25 +79,20 @@ jobs:
5879
uses: actions/checkout@v4
5980

6081
- name: Install Rust
61-
uses: actions-rs/toolchain@v1
62-
with:
63-
toolchain: stable
64-
82+
uses: dtolnay/rust-toolchain@stable
83+
6584
- name: Create private key file
6685
run: printf "%b" "$FIREBLOCKS_PRIVATE_KEY" > fireblocks_secret.key
6786

6887
- name: Set environment variable for private key path
6988
run: echo "FIREBLOCKS_PRIVATE_KEY_PATH=$(pwd)/fireblocks_secret.key" >> $GITHUB_ENV
7089

71-
- name: Install nightly Rust
72-
run: rustup toolchain install nightly
73-
7490
- name: Cache Rust dependencies
7591
uses: Swatinem/rust-cache@v2
7692
with:
7793
cache-on-failure: true
7894

79-
- name: Install testing tools
95+
- name: Install llvm-cov
8096
uses: taiki-e/install-action@v2
8197
with:
8298
tool: cargo-llvm-cov

0 commit comments

Comments
 (0)