1
1
mirror of https://github.com/theoludwig/advent_of_code.git synced 2025-05-18 19:27:51 +02:00

ci: test both MSRV and latest stable Rust versions

This commit is contained in:
2024-01-27 17:49:25 +01:00
parent 21433caf63
commit abcf7c5163
14 changed files with 114 additions and 30 deletions

View File

@ -12,15 +12,39 @@ env:
jobs:
ci:
runs-on: "ubuntu-latest"
strategy:
matrix:
rust-version: ["1.70.0", "stable"]
steps:
- uses: "actions/checkout@v4"
- uses: "dtolnay/rust-toolchain@stable"
with:
components: "clippy, rustfmt"
- run: "rustc --version"
- uses: "actions/checkout@v4.1.1"
- uses: "dtolnay/rust-toolchain@master"
with:
toolchain: "${{ matrix.rust-version }}"
components: "clippy, rustfmt"
- run: "rustc --version"
- run: "cargo build --verbose"
- run: "cargo test --verbose"
- run: "cargo clippy --verbose -- -D warnings"
- run: "cargo fmt -- --check"
lint-markdown:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.1"
- uses: "DavidAnson/markdownlint-cli2-action@v15.0.0"
with:
config: ".markdownlint-cli2.jsonc"
globs: "**/*.md"
lint-commit:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.1"
- uses: "wagoid/commitlint-github-action@v5.4.5"
with:
configFile: ".commitlintrc.json"
failOnWarnings: true