Add repository validation and CI checks

This commit is contained in:
Marco Allegretti 2026-03-10 18:47:16 +01:00
parent a236a3a9f4
commit 3db9541f72
4 changed files with 44 additions and 0 deletions

29
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,29 @@
name: ci
on:
push:
branches:
- main
pull_request:
jobs:
rust:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.93.0
components: rustfmt, clippy
- name: cargo fmt
run: cargo fmt --all --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets -- -D warnings
- name: cargo test
run: cargo test --workspace

5
infra/scripts/check.ps1 Normal file
View file

@ -0,0 +1,5 @@
$ErrorActionPreference = 'Stop'
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

6
infra/scripts/check.sh Normal file
View file

@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

4
justfile Normal file
View file

@ -0,0 +1,4 @@
check:
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace