mirror of
https://github.com/notohh/rustlings.git
synced 2024-11-21 21:42:23 -05:00
chore: consolidate CI workflows
This commit is contained in:
parent
3ad30308ec
commit
f31a18429b
2 changed files with 23 additions and 26 deletions
18
.github/workflows/lint.yml
vendored
18
.github/workflows/lint.yml
vendored
|
@ -1,18 +0,0 @@
|
||||||
name: Lint
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: DavidAnson/markdownlint-cli2-action@v9
|
|
||||||
with:
|
|
||||||
globs: "exercises/**/*.md"
|
|
29
.github/workflows/rust.yml
vendored
29
.github/workflows/rust.yml
vendored
|
@ -10,13 +10,28 @@ env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
fmt:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Fetch & maybe update Cargo.lock
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
run: cargo fetch --locked
|
with:
|
||||||
- name: Build
|
components: rustfmt
|
||||||
run: cargo build --verbose
|
- uses: DavidAnson/markdownlint-cli2-action@v9
|
||||||
- name: Run tests
|
with:
|
||||||
run: cargo test --verbose
|
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
|
||||||
|
|
Loading…
Reference in a new issue