2023-12-01 17:26:01 +01:00
|
|
|
name: "ci"
|
|
|
|
|
|
|
|
on:
|
2023-12-08 18:56:07 +01:00
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
pull_request:
|
|
|
|
branches: ["main"]
|
2023-12-01 17:26:01 +01:00
|
|
|
|
|
|
|
env:
|
2023-12-08 18:56:07 +01:00
|
|
|
CARGO_TERM_COLOR: "always"
|
2023-12-01 17:26:01 +01:00
|
|
|
|
|
|
|
jobs:
|
2023-12-08 18:56:07 +01:00
|
|
|
ci:
|
|
|
|
runs-on: "ubuntu-latest"
|
2024-01-27 17:49:25 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
rust-version: ["1.70.0", "stable"]
|
2023-12-08 18:56:07 +01:00
|
|
|
steps:
|
2024-01-27 17:49:25 +01:00
|
|
|
- uses: "actions/checkout@v4.1.1"
|
|
|
|
|
|
|
|
- uses: "dtolnay/rust-toolchain@master"
|
2023-12-08 18:56:07 +01:00
|
|
|
with:
|
2024-01-27 17:49:25 +01:00
|
|
|
toolchain: "${{ matrix.rust-version }}"
|
2023-12-08 18:56:07 +01:00
|
|
|
components: "clippy, rustfmt"
|
2023-12-01 17:26:01 +01:00
|
|
|
|
2024-01-27 17:49:25 +01:00
|
|
|
- run: "rustc --version"
|
2023-12-08 18:56:07 +01:00
|
|
|
- run: "cargo build --verbose"
|
|
|
|
- run: "cargo test --verbose"
|
|
|
|
- run: "cargo clippy --verbose -- -D warnings"
|
|
|
|
- run: "cargo fmt -- --check"
|
2024-01-27 17:49:25 +01:00
|
|
|
|
|
|
|
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
|