From eb165e700e33cb19a5af3ea80ec07fb174d75642 Mon Sep 17 00:00:00 2001 From: novonotes-dev Date: Mon, 27 Apr 2026 15:14:13 +0900 Subject: [PATCH] Add CI formatting and doctest checks --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ca4f3fa..1b5dbf8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,16 @@ on: pull_request: jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Check Rust formatting + run: cargo fmt --all -- --check + test-linux: runs-on: ubuntu-latest steps: @@ -22,21 +32,33 @@ jobs: libpango1.0-dev \ libatk1.0-dev \ libcairo2-dev + - name: Cargo check + run: cargo check --all-targets - name: Cargo test run: xvfb-run -a cargo test --all-targets + - name: Cargo test doctests + run: cargo test --doc test-macos: runs-on: macos-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - name: Cargo check + run: cargo check --all-targets - name: Cargo test run: cargo test --all-targets + - name: Cargo test doctests + run: cargo test --doc test-windows: runs-on: windows-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable + - name: Cargo check + run: cargo check --all-targets - name: Cargo test run: cargo test --all-targets + - name: Cargo test doctests + run: cargo test --doc