|
1 | | -on: [push, pull_request] |
2 | | - |
3 | 1 | name: CI |
4 | 2 |
|
| 3 | +on: [push, pull_request] |
5 | 4 | permissions: {} |
6 | | - |
7 | 5 | env: |
8 | 6 | CARGO_TERM_COLOR: always |
9 | 7 | RUST_BACKTRACE: 1 |
10 | 8 |
|
11 | 9 | jobs: |
12 | | - fmt: |
13 | | - name: Rust fmt |
| 10 | + check: |
| 11 | + name: Check |
14 | 12 | runs-on: ubuntu-latest |
15 | 13 | steps: |
16 | | - - name: Checkout |
17 | | - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 |
| 14 | + - name: Checkout repository |
| 15 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
18 | 16 | with: |
19 | 17 | persist-credentials: false |
20 | | - - name: Install Rust toolchain |
21 | | - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 |
22 | | - with: |
23 | | - toolchain: stable |
24 | | - components: rustfmt |
25 | | - cache: true |
26 | 18 |
|
27 | | - - name: Check fmt |
28 | | - run: cargo fmt --all -- --check |
| 19 | + - name: Install just |
| 20 | + uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3 |
29 | 21 |
|
30 | | - # Clippy lints |
31 | | - clippy: |
32 | | - name: Clippy (${{ matrix.features }}) |
33 | | - runs-on: ubuntu-latest |
34 | | - strategy: |
35 | | - matrix: |
36 | | - features: |
37 | | - - --no-default-features |
38 | | - - --all-features |
39 | | - steps: |
40 | | - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 |
41 | | - with: |
42 | | - persist-credentials: false |
43 | | - - name: Install Rust toolchain |
44 | | - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 |
45 | | - with: |
46 | | - toolchain: stable |
47 | | - components: clippy |
48 | | - cache: true |
| 22 | + - name: Setup cargo-rbmt |
| 23 | + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 |
49 | 24 |
|
50 | | - - name: Run Clippy |
51 | | - run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings |
| 25 | + - name: Check check |
| 26 | + run: just check |
52 | 27 |
|
53 | | - # Build and test |
54 | 28 | test: |
55 | | - name: Test (stable, ${{ matrix.features }}) |
| 29 | + name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.lockfile }} deps |
56 | 30 | runs-on: ubuntu-latest |
57 | 31 | strategy: |
58 | 32 | fail-fast: false |
59 | 33 | matrix: |
60 | | - features: |
61 | | - - --no-default-features |
62 | | - - --all-features |
63 | | - steps: |
64 | | - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 |
65 | | - with: |
66 | | - persist-credentials: false |
67 | | - - name: Install Rust toolchain |
68 | | - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 |
69 | | - with: |
70 | | - toolchain: stable |
71 | | - cache: true |
72 | | - |
73 | | - - name: Build |
74 | | - run: cargo build ${{ matrix.features }} --verbose |
75 | | - |
76 | | - - name: Run unit tests |
77 | | - run: cargo test ${{ matrix.features }} --lib --verbose |
| 34 | + toolchain: [stable, msrv] |
| 35 | + lockfile: [minimal, recent] |
| 36 | + exclude: |
| 37 | + # Exclude MSRV toolchain + `Cargo-recent.lock` |
| 38 | + - toolchain: msrv |
| 39 | + lockfile: recent |
78 | 40 |
|
79 | | - - name: Run doc tests |
80 | | - run: cargo test ${{ matrix.features }} --doc --verbose |
81 | | - |
82 | | - - name: Run RPC client tests |
83 | | - run: cargo test --test test_rpc_client --verbose -- --test-threads=2 |
84 | | - |
85 | | - # MSRV |
86 | | - msrv: |
87 | | - name: MSRV |
88 | | - runs-on: ubuntu-latest |
89 | 41 | steps: |
90 | | - - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 |
| 42 | + - name: Checkout repository |
| 43 | + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
91 | 44 | with: |
92 | 45 | persist-credentials: false |
93 | | - - name: Install Rust toolchain |
94 | | - uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 |
95 | | - with: |
96 | | - toolchain: 1.75.0 |
97 | | - cache: true |
98 | 46 |
|
99 | | - - name: Check MSRV |
100 | | - run: cargo check --all-features |
| 47 | + - name: Setup cargo-rbmt |
| 48 | + uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 |
| 49 | + |
| 50 | + - name: Run tests |
| 51 | + run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.lockfile }} |
0 commit comments