Skip to content

Commit 8a07904

Browse files
committed
Add int tests to workflow
Cleanup CI dependancies
1 parent 4311760 commit 8a07904

File tree

2 files changed

+34
-15
lines changed

2 files changed

+34
-15
lines changed

.github/workflows/rust.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@ jobs:
4747
DO_FMT: true
4848
run: ./contrib/test.sh
4949

50+
Int-tests:
51+
name: Integration tests
52+
runs-on: ubuntu-latest
53+
steps:
54+
- name: Checkout Crate
55+
uses: actions/checkout@v2
56+
- name: Checkout Toolchain
57+
uses: actions-rs/toolchain@v1
58+
with:
59+
profile: minimal
60+
toolchain: stable
61+
override: true
62+
- name: Running integration tests
63+
env:
64+
DO_BITCOIND_TESTS: true
65+
run: ./contrib/test.sh
66+
5067
Tests:
5168
name: Tests
5269
runs-on: ubuntu-latest

contrib/test.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,33 +4,26 @@ set -ex
44

55
FEATURES="compiler serde rand base64"
66

7-
cargo update -p serde --precise 1.0.142
8-
cargo update -p serde_derive --precise 1.0.142
9-
107
cargo --version
118
rustc --version
129

10+
# Format if told to
11+
if [ "$DO_FMT" = true ]
12+
then
13+
rustup component add rustfmt
14+
cargo fmt -- --check
15+
fi
16+
1317
# Pin dependencies required to build with Rust 1.41.1
1418
if cargo --version | grep "1\.41\.0"; then
15-
cargo update -p url --precise 2.2.2
16-
cargo update -p form_urlencoded --precise 1.0.1
1719
cargo update -p once_cell --precise 1.13.1
18-
cargo update -p bzip2 --precise 0.4.2
19-
cargo update -p which --precise 4.3.0
2020
fi
2121

2222
# Pin dependencies required to build with Rust 1.47.0
2323
if cargo --version | grep "1\.47\.0"; then
2424
cargo update -p once_cell --precise 1.13.1
2525
fi
2626

27-
# Format if told to
28-
if [ "$DO_FMT" = true ]
29-
then
30-
rustup component add rustfmt
31-
cargo fmt -- --check
32-
fi
33-
3427
# Fuzz if told to
3528
if [ "$DO_FUZZ" = true ]
3629
then
@@ -42,6 +35,15 @@ then
4235
exit 0
4336
fi
4437

38+
# Test bitcoind integration tests if told to (this only works with the stable toolchain)
39+
if [ "$DO_BITCOIND_TESTS" = true ]; then
40+
cd bitcoind-tests
41+
cargo test --verbose
42+
43+
# Exit integration tests, do not run other tests.
44+
exit 0
45+
fi
46+
4547
# Defaults / sanity checks
4648
cargo test
4749

@@ -65,7 +67,7 @@ then
6567
cargo run --example psbt
6668
cargo run --example xpub_descriptors
6769
cargo run --example taproot --features=compiler
68-
cargo run --example psbt_sign_finalize
70+
cargo run --example psbt_sign_finalize --features=base64
6971
fi
7072

7173
if [ "$DO_NO_STD" = true ]

0 commit comments

Comments
 (0)