From 1aa1413f001eaca593b85d8b95cbd2b1f1dd2709 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Tue, 31 Jan 2023 11:44:41 +0000 Subject: [PATCH 1/2] run tests in CI --- .github/workflows/ci.yml | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 143ac2b6d..76ab7f31e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,25 +8,38 @@ on: - trying jobs: - msrv: - name: Rust MSRV + + check: + name: check runs-on: ubuntu-latest + strategy: + matrix: + build: [msrv, stable] + features: ["", "--no-default-features", "--no-default-features --features use_alloc", "--all-targets --all-features"] + include: + - build: msrv + rust: 1.62.1 + - build: stable + rust: stable + exclude: + - build: msrv + # we only care about the MSRV with respect to the lib target + features: "--all-targets --all-features" steps: - - uses: actions/checkout@v2 - - uses: dtolnay/rust-toolchain@1.36.0 - - run: cargo check --no-default-features - - run: cargo check --no-default-features --features "use_alloc" - - run: cargo check + - uses: actions/checkout@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.rust }} + - run: cargo check ${{ matrix.features }} - stable: - name: Rust Stable + test: + name: test runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable - - run: cargo check --no-default-features - - run: cargo check --no-default-features --features "use_alloc" - - run: cargo test + - run: cargo test --all-features + # https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 end-success: From 403c93a63b21f488f5a9a9941e9ca46134a4affa Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Tue, 31 Jan 2023 11:46:19 +0000 Subject: [PATCH 2/2] fixup --- .github/workflows/ci.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 76ab7f31e..92122cca0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,14 +8,19 @@ on: - trying jobs: - check: name: check runs-on: ubuntu-latest strategy: matrix: build: [msrv, stable] - features: ["", "--no-default-features", "--no-default-features --features use_alloc", "--all-targets --all-features"] + features: + [ + "", + "--no-default-features", + "--no-default-features --features use_alloc", + "--all-targets --all-features", + ] include: - build: msrv rust: 1.62.1 @@ -40,13 +45,12 @@ jobs: - uses: dtolnay/rust-toolchain@stable - run: cargo test --all-features - # https://github.com/rust-lang/crater/blob/9ab6f9697c901c4a44025cf0a39b73ad5b37d198/.github/workflows/bors.yml#L125-L149 end-success: name: bors build finished if: success() runs-on: ubuntu-latest - needs: [msrv,stable] + needs: [check, test] steps: - name: Mark the job as successful