mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-25 23:10:30 +00:00
Update CI and release hook
This commit is contained in:
parent
516fcf9168
commit
2854dc9ab3
2 changed files with 11 additions and 4 deletions
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
|
@ -23,7 +23,9 @@ jobs:
|
||||||
with:
|
with:
|
||||||
globs: "exercises/**/*.md"
|
globs: "exercises/**/*.md"
|
||||||
- name: Run cargo fmt
|
- 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:
|
test:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -33,7 +35,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- uses: swatinem/rust-cache@v2
|
- uses: swatinem/rust-cache@v2
|
||||||
- name: Run cargo test
|
- name: Run cargo test
|
||||||
run: cargo test
|
run: cargo test --workspace
|
||||||
dev-check:
|
dev-check:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
|
@ -3,7 +3,12 @@
|
||||||
# Error out if any command fails
|
# Error out if any command fails
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
cargo run -- dev check
|
|
||||||
typos
|
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 test --workspace --all-targets
|
||||||
|
cargo run -- dev check --require-solutions
|
||||||
|
|
Loading…
Reference in a new issue