From 3a33f774ebab8d48d28b21d88aca553d96b108c0 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 29 Nov 2026 16:01:02 +0200 Subject: [PATCH] ci: run formatting, clippy and tests on GitHub Actions --- .github/workflows/ci.yml | 43 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..60413b39 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,43 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + RUST_BACKTRACE: 1 + +jobs: + check: + name: ${{ matrix.name }} + runs-on: ubuntu-latest + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + include: + - name: Formatting + command: cargo fmt --all -- --check + - name: Clippy + command: cargo clippy --locked --all-targets -- -D warnings + - name: Tests + command: cargo test --locked + steps: + - uses: actions/checkout@v4 + - name: Install Rust + run: rustup show && rustup component add rustfmt clippy + - uses: Swatinem/rust-cache@v2 + - name: ${{ matrix.name }} + env: + BOLERO_RANDOM_TEST_TIME_MS: 5000 + run: ${{ matrix.command }}