-
Notifications
You must be signed in to change notification settings - Fork 5
Move CI and local testing to cargo-rbmt
#39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
19a8a22
a37833e
4c04e79
80aa109
292737a
0616786
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,100 +1,57 @@ | ||
| on: [push, pull_request] | ||
|
|
||
| name: CI | ||
|
|
||
| on: [push, pull_request] | ||
| permissions: {} | ||
|
|
||
| env: | ||
| CARGO_TERM_COLOR: always | ||
| RUST_BACKTRACE: 1 | ||
|
|
||
| jobs: | ||
| fmt: | ||
| name: Rust fmt | ||
| check: | ||
| name: Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 | ||
| with: | ||
| toolchain: stable | ||
| components: rustfmt | ||
| cache: true | ||
|
|
||
| - name: Check fmt | ||
| run: cargo fmt --all -- --check | ||
| - name: Install just | ||
| uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3 | ||
|
|
||
| # Clippy lints | ||
| clippy: | ||
| name: Clippy (${{ matrix.features }}) | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| features: | ||
| - --no-default-features | ||
| - --all-features | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 | ||
| with: | ||
| toolchain: stable | ||
| components: clippy | ||
| cache: true | ||
| - name: Setup build cache | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
|
|
||
| - name: Run Clippy | ||
| run: cargo clippy ${{ matrix.features }} --all-targets -- -D warnings | ||
| - name: Setup cargo-rbmt | ||
| uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 | ||
|
|
||
| - name: Check check | ||
| run: just check | ||
|
|
||
| # Build and test | ||
| test: | ||
| name: Test (stable, ${{ matrix.features }}) | ||
| name: Test - ${{ matrix.toolchain }} toolchain, ${{ matrix.lockfile }} deps | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| features: | ||
| - --no-default-features | ||
| - --all-features | ||
| toolchain: [stable, msrv] | ||
| lockfile: [minimal, recent] | ||
| exclude: | ||
| # Exclude MSRV toolchain + `Cargo-recent.lock` | ||
| - toolchain: msrv | ||
| lockfile: recent | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 | ||
| with: | ||
| toolchain: stable | ||
| cache: true | ||
|
|
||
| - name: Build | ||
| run: cargo build ${{ matrix.features }} --verbose | ||
|
|
||
| - name: Run unit tests | ||
| run: cargo test ${{ matrix.features }} --lib --verbose | ||
|
|
||
| - name: Run doc tests | ||
| run: cargo test ${{ matrix.features }} --doc --verbose | ||
|
|
||
| - name: Run RPC client tests | ||
| run: cargo test --test test_rpc_client --verbose -- --test-threads=2 | ||
| - name: Setup build cache | ||
| uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 | ||
|
|
||
| # MSRV | ||
| msrv: | ||
| name: MSRV | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | ||
| with: | ||
| persist-credentials: false | ||
| - name: Install Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # v1 | ||
| with: | ||
| toolchain: 1.75.0 | ||
| cache: true | ||
| - name: Setup cargo-rbmt | ||
| uses: rust-bitcoin/rust-bitcoin-maintainer-tools/.github/actions/setup-rbmt@6560b728ae6a81af9d92713b630ba26772fbd970 | ||
|
|
||
| - name: Check MSRV | ||
| run: cargo check --all-features | ||
| - name: Run tests | ||
| run: cargo rbmt test --toolchain ${{ matrix.toolchain }} --lock-file ${{ matrix.lockfile }} | ||
tvpeter marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| name: Signed Commits | ||
| on: [push, pull_request] | ||
| permissions: {} | ||
| env: | ||
| CARGO_TERM_COLOR: always | ||
|
|
||
| jobs: | ||
| Signatures: | ||
| name: Assert all commits are signed | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| persist-credentials: false | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Setup just | ||
| uses: extractions/setup-just@f8a3cce218d9f83db3a2ecd90e41ac3de6cdfd9b # v3 | ||
|
|
||
| - name: Check commit signatures | ||
| run: just check-sigs | ||
|
Comment on lines
+18
to
+22
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I would rather avoid the
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The idea is to centralize all config in the |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,26 +1,5 @@ | ||
| # Generated by Cargo | ||
| # will have compiled files and executables | ||
| debug | ||
| target | ||
|
|
||
| # These are backup files generated by rustfmt | ||
| Cargo.lock | ||
| /target | ||
| **/*.rs.bk | ||
|
|
||
| # MSVC Windows builds of rustc generate these, which store debugging information | ||
| *.pdb | ||
|
|
||
| # Generated by cargo mutants | ||
| # Contains mutation testing data | ||
| **/mutants.out*/ | ||
|
|
||
| # RustRover | ||
| # JetBrains specific template is maintained in a separate JetBrains.gitignore that can | ||
| # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore | ||
| # and can be added to the global gitignore or merged into this file. For a more nuclear | ||
| # option (not recommended) you can uncomment the following to ignore the entire idea folder. | ||
| #.idea/ | ||
|
|
||
|
|
||
| # Added by cargo | ||
|
|
||
| /target |
Uh oh!
There was an error while loading. Please reload this page.