rustlings/.github/workflows/rust.yml

43 lines
926 B
YAML
Raw Normal View History

2022-07-15 07:46:03 -04:00
name: Rustlings Tests
on:
push:
2024-04-17 04:35:29 -04:00
branches: [main]
2022-07-15 07:46:03 -04:00
pull_request:
2024-04-17 04:35:29 -04:00
branches: [main]
2022-07-15 07:46:03 -04:00
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cargo clippy -- --deny warnings
2023-09-04 08:57:16 -04:00
fmt:
2022-07-15 07:46:03 -04:00
runs-on: ubuntu-latest
steps:
2023-09-04 08:57:16 -04:00
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: DavidAnson/markdownlint-cli2-action@v9
with:
globs: "exercises/**/*.md"
- name: Run cargo fmt
run: |
cargo fmt --all -- --check
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: swatinem/rust-cache@v2
- name: Run cargo test
run: |
cargo test