Skip to content

Commit 66aa522

Browse files
committed
fix(actions): speed up rust builds
1 parent adc7e69 commit 66aa522

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

.github/workflows/test-rust-examples.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,17 @@ jobs:
1414
working-directory: ./examples/developer-hub-rust
1515
steps:
1616
- uses: actions/checkout@v4
17-
1817
- name: Install Rust toolchain
1918
uses: dtolnay/rust-toolchain@stable
2019
with:
2120
components: rustfmt, clippy
22-
2321
- name: Cache dependencies
2422
uses: Swatinem/rust-cache@v2
25-
2623
- name: Format with rustfmt
2724
run: cargo fmt -- --check
28-
2925
- name: Lint with clippy
30-
run: cargo clippy -- -D warnings
31-
26+
run: cargo clippy --bins -- -D warnings
27+
- name: Build
28+
run: cargo build --bins
3229
- name: Run tests
3330
run: ./test.sh

examples/developer-hub-rust/test.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,7 @@ run_test() {
4444
}
4545

4646
main() {
47-
echo "--- Building all example binaries ---"
48-
cargo build --bins
49-
echo ""
50-
51-
echo "--- Running All Tests ---"
47+
echo "--- Running Tests On Pre-Built Binaries ---"
5248
run_test "Coston2 Chain ID" "chain_id_coston2" "exact" "Chain ID: 114"
5349
run_test "Flare Chain ID" "chain_id_flare" "exact" "Chain ID: 14"
5450
run_test "Coston2 WNat Address" "make_query_coston2" "exact" "WNat address: 0xC67DCE33D7A8efA5FfEB961899C73fe01bCe9273"

0 commit comments

Comments
 (0)