1
1
mirror of https://github.com/theoludwig/advent_of_code_2023.git synced 2024-11-09 22:08:53 +01:00
advent_of_code_2023/.github/workflows/ci.yml

51 lines
1.1 KiB
YAML

name: "ci"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: "always"
jobs:
ci:
runs-on: "ubuntu-latest"
strategy:
matrix:
rust-version: ["1.70.0", "stable"]
steps:
- 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