From 2854dc9ab347ae500e2a2fe4b6ec6c785fb5796f Mon Sep 17 00:00:00 2001 From: mo8it Date: Sat, 13 Jul 2024 12:32:23 +0200 Subject: [PATCH] Update CI and release hook --- .github/workflows/rust.yml | 6 ++++-- release-hook.sh | 9 +++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b68cb1b3..5c423e24 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,9 @@ jobs: with: globs: "exercises/**/*.md" - name: Run cargo fmt - run: cargo fmt --all -- --check + run: cargo fmt --all --check + - name: Run rustfmt on solutions + run: rustfmt --check --edition 2021 --color always solutions/**/*.rs test: runs-on: ${{ matrix.os }} strategy: @@ -33,7 +35,7 @@ jobs: - uses: actions/checkout@v4 - uses: swatinem/rust-cache@v2 - name: Run cargo test - run: cargo test + run: cargo test --workspace dev-check: runs-on: ubuntu-latest steps: diff --git a/release-hook.sh b/release-hook.sh index 052832f2..f021f193 100755 --- a/release-hook.sh +++ b/release-hook.sh @@ -3,7 +3,12 @@ # Error out if any command fails set -e -cargo run -- dev check typos -cargo outdated -w --exit-code 1 +cargo upgrades + +# Similar to CI +cargo clippy -- --deny warnings +cargo fmt --all --check +rustfmt --check --edition 2021 solutions/**/*.rs cargo test --workspace --all-targets +cargo run -- dev check --require-solutions