From 14b1949341d727d61a6f37af0a04e9503d73998a Mon Sep 17 00:00:00 2001 From: SomeB1oody Date: Wed, 7 Oct 2026 10:50:03 -0700 Subject: [PATCH] Combine GitHub Actions into a unified CI workflow clippy.yml, doc.yml, fmt.yml, and test.yml are combined into ci.yml. guide.yml remains separate. --- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++++++++++++++ .github/workflows/clippy.yml | 30 ---------------- .github/workflows/doc.yml | 30 ---------------- .github/workflows/fmt.yml | 25 ------------- .github/workflows/test.yml | 28 --------------- 5 files changed, 69 insertions(+), 113 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/clippy.yml delete mode 100644 .github/workflows/doc.yml delete mode 100644 .github/workflows/fmt.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..238d5163 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: ci + +on: + push: + branches: [master] + pull_request: + branches: [master] + +# Cancel superseded runs on the same ref to save CI minutes +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + CARGO_TERM_COLOR: always + +jobs: + fmt: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt + - name: Check formatting + run: cargo fmt --all -- --check + + clippy: + name: cargo clippy + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + - name: Cache cargo artifacts + uses: Swatinem/rust-cache@v2 + - name: Run clippy + run: cargo clippy --all-features --all-targets -- -D warnings + + test: + name: cargo test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Cache cargo artifacts + uses: Swatinem/rust-cache@v2 + - name: Run tests + run: cargo test --all-features + + doc: + name: cargo doc + runs-on: ubuntu-latest + env: + # Fail the build on any rustdoc warning + RUSTDOCFLAGS: -D warnings + steps: + - uses: actions/checkout@v4 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Cache cargo artifacts + uses: Swatinem/rust-cache@v2 + - name: Build documentation + run: cargo doc --all-features --no-deps diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml deleted file mode 100644 index 5d116b1f..00000000 --- a/.github/workflows/clippy.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: clippy - -on: - push: - branches: [master] - pull_request: - branches: [master] - -# Cancel superseded runs on the same ref to save CI minutes. -concurrency: - group: clippy-${{ github.ref }} - cancel-in-progress: true - -env: - CARGO_TERM_COLOR: always - -jobs: - clippy: - name: cargo clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy - - name: Cache cargo artifacts - uses: Swatinem/rust-cache@v2 - - name: Run clippy - run: cargo clippy --all-features --all-targets -- -D warnings diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml deleted file mode 100644 index fa2cceab..00000000 --- a/.github/workflows/doc.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: doc - -on: - push: - branches: [master] - pull_request: - branches: [master] - -# Cancel superseded runs on the same ref to save CI minutes. -concurrency: - group: doc-${{ github.ref }} - cancel-in-progress: true - -env: - CARGO_TERM_COLOR: always - # Fail the build on any rustdoc warning (e.g. broken intra-doc links). - RUSTDOCFLAGS: -D warnings - -jobs: - doc: - name: cargo doc - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - name: Cache cargo artifacts - uses: Swatinem/rust-cache@v2 - - name: Build documentation - run: cargo doc --all-features --no-deps diff --git a/.github/workflows/fmt.yml b/.github/workflows/fmt.yml deleted file mode 100644 index aa154de2..00000000 --- a/.github/workflows/fmt.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: fmt - -on: - push: - branches: [master] - pull_request: - branches: [master] - -# Cancel superseded runs on the same ref to save CI minutes. -concurrency: - group: fmt-${{ github.ref }} - cancel-in-progress: true - -jobs: - fmt: - name: cargo fmt - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: rustfmt - - name: Check formatting - run: cargo fmt --all -- --check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index b014f527..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: test - -on: - push: - branches: [master] - pull_request: - branches: [master] - -# Cancel superseded runs on the same ref to save CI minutes. -concurrency: - group: test-${{ github.ref }} - cancel-in-progress: true - -env: - CARGO_TERM_COLOR: always - -jobs: - test: - name: cargo test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable - - name: Cache cargo artifacts - uses: Swatinem/rust-cache@v2 - - name: Run tests - run: cargo test --all-features