Skip to content

Commit d5ea4a0

Browse files
committed
Update CI
Make sure to lint and check everything in every configuration. Don't fail if an updated (transitive) dependency requires a newer msrv than the current msrv of markup.
1 parent 432a36e commit d5ea4a0

File tree

1 file changed

+39
-11
lines changed

1 file changed

+39
-11
lines changed

.github/workflows/build.yml

Lines changed: 39 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,51 @@ name: Build
33
on: [push, pull_request]
44

55
jobs:
6-
build:
7-
name: ${{ matrix.os }} - ${{ matrix.rust }}
6+
clippy:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [ubuntu-latest]
11+
rust: [stable, nightly]
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: dtolnay/rust-toolchain@master
15+
with:
16+
toolchain: ${{ matrix.rust }}
17+
components: clippy
18+
- run: cargo clippy --workspace --no-default-features
19+
- run: cargo clippy --workspace --all-features
20+
21+
fmt:
22+
runs-on: ${{ matrix.os }}
23+
strategy:
24+
matrix:
25+
os: [ubuntu-latest]
26+
rust: [nightly]
27+
steps:
28+
- uses: actions/checkout@v3
29+
- uses: dtolnay/rust-toolchain@master
30+
with:
31+
toolchain: ${{ matrix.rust }}
32+
components: rustfmt
33+
- run: cargo fmt --all -- --check
34+
35+
test:
836
runs-on: ${{ matrix.os }}
937
strategy:
1038
matrix:
1139
os: [ubuntu-latest, macos-latest, windows-latest]
12-
rust: [stable, nightly, 1.65.0]
40+
rust: [stable, nightly, '1.65.0']
1341
steps:
1442
- uses: actions/checkout@v3
1543
- uses: dtolnay/rust-toolchain@master
1644
with:
1745
toolchain: ${{ matrix.rust }}
18-
components: clippy, rustfmt
19-
- run: cargo build
20-
- run: cargo test
21-
- run: cargo test --features itoa
22-
working-directory: markup
23-
- run: cargo fmt -- --check
24-
if: ${{ matrix.os == 'ubuntu-latest' }}
25-
- run: cargo clippy --all-targets
46+
- uses: taiki-e/install-action@v2
47+
with:
48+
tool: cargo-hack
49+
- run: cargo generate-lockfile -Zminimal-versions
50+
env:
51+
RUSTC_BOOTSTRAP: 1
52+
if: ${{ matrix.rust == '1.65.0' }}
53+
- run: cargo hack test --workspace --feature-powerset --optional-deps

0 commit comments

Comments
 (0)