From 3db9541f721027a3fc39f6fb8c0c54c9b8a3bcd7 Mon Sep 17 00:00:00 2001 From: Marco Allegretti Date: Tue, 10 Mar 2026 18:47:16 +0100 Subject: [PATCH] Add repository validation and CI checks --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ infra/scripts/check.ps1 | 5 +++++ infra/scripts/check.sh | 6 ++++++ justfile | 4 ++++ 4 files changed, 44 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 infra/scripts/check.ps1 create mode 100644 infra/scripts/check.sh create mode 100644 justfile diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b91f94b --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 diff --git a/infra/scripts/check.ps1 b/infra/scripts/check.ps1 new file mode 100644 index 0000000..a9c18d3 --- /dev/null +++ b/infra/scripts/check.ps1 @@ -0,0 +1,5 @@ +$ErrorActionPreference = 'Stop' + +cargo fmt --all --check +cargo clippy --workspace --all-targets -- -D warnings +cargo test --workspace diff --git a/infra/scripts/check.sh b/infra/scripts/check.sh new file mode 100644 index 0000000..06565d3 --- /dev/null +++ b/infra/scripts/check.sh @@ -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 diff --git a/justfile b/justfile new file mode 100644 index 0000000..ab50a4a --- /dev/null +++ b/justfile @@ -0,0 +1,4 @@ +check: + cargo fmt --all --check + cargo clippy --workspace --all-targets -- -D warnings + cargo test --workspace