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

48 lines
1.0 KiB
YAML
Raw Permalink Normal View History

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"
strategy:
matrix:
2024-01-27 18:53:26 +01:00
rust-version: ["1.74.0", "stable"]
2023-12-08 18:56:07 +01:00
steps:
- uses: "actions/checkout@v4.1.1"
- uses: "dtolnay/rust-toolchain@master"
2023-12-08 18:56:07 +01:00
with:
toolchain: "${{ matrix.rust-version }}"
2023-12-08 18:56:07 +01:00
components: "clippy, rustfmt"
2023-12-01 17:26:01 +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"
lint-general:
2024-01-27 18:53:26 +01:00
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4.1.1"
- name: "Setup Node.js"
uses: "actions/setup-node@v4.0.1"
with:
node-version: "20.x"
2024-01-27 18:53:26 +01:00
- run: "npm clean-install"
2024-01-27 18:53:26 +01:00
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: "npm run lint:editorconfig"
- run: "npm run lint:markdown"
- run: "npm run lint:prettier"