Merge pull request #2227 from Hunter-Plus/patch-1 #1416
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rustlings Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: cargo clippy -- --deny warnings | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DavidAnson/markdownlint-cli2-action@v16 | |
with: | |
globs: "exercises/**/*.md" | |
- name: rustfmt | |
run: cargo fmt --all --check | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: swatinem/rust-cache@v2 | |
- name: cargo test | |
run: cargo test --workspace | |
dev-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: swatinem/rust-cache@v2 | |
- name: rustlings dev check | |
run: cargo run -- dev check --require-solutions |