2022-07-15 14:46:03 +03:00
|
|
|
name: Rustlings Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-04-17 11:35:29 +03:00
|
|
|
branches: [main]
|
2022-07-15 14:46:03 +03:00
|
|
|
pull_request:
|
2024-04-17 11:35:29 +03:00
|
|
|
branches: [main]
|
2022-07-15 14:46:03 +03:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
2024-04-17 11:35:53 +03:00
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- run: cargo clippy -- --deny warnings
|
2023-09-04 15:57:16 +03:00
|
|
|
fmt:
|
2022-07-15 14:46:03 +03:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-07-03 18:49:41 +03:00
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: DavidAnson/markdownlint-cli2-action@v16
|
2023-09-04 15:57:16 +03:00
|
|
|
with:
|
|
|
|
globs: "exercises/**/*.md"
|
|
|
|
- name: Run cargo fmt
|
2024-07-03 18:49:41 +03:00
|
|
|
run: cargo fmt --all -- --check
|
2023-09-04 15:57:16 +03:00
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
|
|
steps:
|
2024-07-03 18:49:41 +03:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-04 15:57:16 +03:00
|
|
|
- uses: swatinem/rust-cache@v2
|
|
|
|
- name: Run cargo test
|
2024-07-03 18:49:41 +03:00
|
|
|
run: cargo test
|
2024-07-03 18:59:10 +03:00
|
|
|
dev-check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: swatinem/rust-cache@v2
|
2024-07-03 18:49:41 +03:00
|
|
|
- name: Run rustlings dev check
|
|
|
|
run: cargo run -- dev check
|