Merge rust-bitcoin/rust-bitcoin#2866: Run schemars test from extra_tests

1f58476cb4 Run schemars test from extra_tests (Tobin C. Harding)

Pull request description:

  We have a mechanism to run additional custom tests by way of the `extra_tests.sh` script in each crate.

  Remove the CI job and run the schemars test using `extra_tests.sh`. This patch changes the test coverage because currently the schemars test is only run with a stable toolchain but with this patch applied it runs with stable, MSRV, and nightly.

  Fix: #2787

ACKs for top commit:
  apoelstra:
    ACK 1f58476cb4

Tree-SHA512: 607132890ed08bf75fb544a0e10aeeda5f9c137eb04349f8af5ab28866408d4208cae4688c08645ffca95e7d9568562dbbbfa992382b5d2cb3efeba583d78b1f
This commit is contained in:
Andrew Poelstra 2024-06-15 03:43:59 +00:00
commit dc866a70bc
No known key found for this signature in database
GPG Key ID: C588D63CE41B97C1
3 changed files with 12 additions and 30 deletions

View File

@ -8,8 +8,7 @@ The minimal/recent lock files are handled by CI (`rust.yml`).
## Jobs ## Jobs
Run from `rust.yml` unless stated otherwise. Total 21 jobs but Run from `rust.yml` unless stated otherwise.
`Prepare` is quick and must be run first anyway.
0. `Prepare` 0. `Prepare`
1. `Stable - minimal` 1. `Stable - minimal`
@ -24,11 +23,10 @@ Run from `rust.yml` unless stated otherwise. Total 21 jobs but
10. `Bench` 10. `Bench`
11. `ASAN` 11. `ASAN`
12. `WASM` 12. `WASM`
13. `schemars` 13. `Arch32bit`
14. `Arch32bit` 14. `Cross`
15. `Cross` 15. `Embedded`
16. `Embedded` 16. `Kani`
17. `Kani` 17. `Coveralls` - run by `coveralls.yml`
18. `Coveralls` - run by `coveralls.yml` 18. `release` - run by `release.yml`
19. `release` - run by `release.yml` 19. `labeler` - run by `manage-pr.yml`
20. `labeler` - run by `manage-pr.yml`

View File

@ -292,20 +292,6 @@ jobs:
- name: "Run wasm script" - name: "Run wasm script"
run: cd hashes && ./contrib/wasm.sh run: cd hashes && ./contrib/wasm.sh
Schemars: # hashes crate only.
name: Schemars - stable toolchain
runs-on: ubuntu-latest
strategy:
fail-fast: false
# Note we do not use the recent lock file for schemars testing.
steps:
- name: "Checkout repo"
uses: actions/checkout@v4
- name: "Select toolchain"
uses: dtolnay/rust-toolchain@stable
- name: "Run schemars test"
run: cd hashes/extended_tests/schemars && cargo test
Kani: Kani:
name: Kani codegen - stable toolchain name: Kani codegen - stable toolchain
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04

View File

@ -1,11 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -ex set -euox pipefail
REPO_DIR=$(git rev-parse --show-toplevel) REPO_DIR=$(git rev-parse --show-toplevel)
if [ "$DO_SCHEMARS_TESTS" = true ]; then pushd "$REPO_DIR/hashes/extended_tests/schemars" > /dev/null
pushd "$REPO_DIR/hashes/extended_tests/schemars" > /dev/null cargo test
cargo test popd > /dev/null
popd > /dev/null
fi