Skip to content

Commit f31a184

Browse files
author
liv
committed
chore: consolidate CI workflows
1 parent 3ad3030 commit f31a184

File tree

2 files changed

+23
-26
lines changed

2 files changed

+23
-26
lines changed

.github/workflows/lint.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/workflows/rust.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,28 @@ env:
1010
CARGO_TERM_COLOR: always
1111

1212
jobs:
13-
build:
13+
fmt:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
17-
- name: Fetch & maybe update Cargo.lock
18-
run: cargo fetch --locked
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
16+
- uses: actions/checkout@v3
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
- uses: DavidAnson/markdownlint-cli2-action@v9
21+
with:
22+
globs: "exercises/**/*.md"
23+
- name: Run cargo fmt
24+
run: |
25+
cargo fmt --all -- --check
26+
test:
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
matrix:
30+
os: [ubuntu-latest, windows-latest, macOS-latest]
31+
steps:
32+
- uses: actions/checkout@v3
33+
- uses: dtolnay/rust-toolchain@stable
34+
- uses: swatinem/rust-cache@v2
35+
- name: Run cargo test
36+
run: |
37+
cargo test

0 commit comments

Comments
 (0)