From f82a366771bad00b390ba7449e0f601e123e8c3e Mon Sep 17 00:00:00 2001 From: zinodict121 Date: Sat, 22 Aug 2026 09:13:51 -0700 Subject: [PATCH] chore: optimize and cleanup CI workflows --- .github/workflows/auto-assign.yml | 2 +- .github/workflows/auto-merge-pr.yml | 2 +- .github/workflows/backend-ci.yml | 29 ++++++----------------- .github/workflows/dependency-security.yml | 9 ++++--- 4 files changed, 13 insertions(+), 29 deletions(-) diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml index c03f312b..24b7a5a6 100644 --- a/.github/workflows/auto-assign.yml +++ b/.github/workflows/auto-assign.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check for assign request - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/auto-merge-pr.yml b/.github/workflows/auto-merge-pr.yml index df03f431..1fce57f2 100644 --- a/.github/workflows/auto-merge-pr.yml +++ b/.github/workflows/auto-merge-pr.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Enable auto-merge - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index 091139f0..7ccc4517 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -11,7 +11,7 @@ env: jobs: - pre-commit: + lint: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -27,30 +27,18 @@ jobs: python-version: '3.x' - name: Cache pre-commit hooks - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pre-commit key: ${{ runner.os }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }} + - name: Cache rust dependencies + uses: Swatinem/rust-cache@v2 + - name: Run pre-commit hook suite run: | python -m pip install pre-commit pre-commit run --all-files - lint-check-type: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Install stable toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy, rustfmt - - - name: Cache cargo registry - uses: actions/cache@v3 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} - name: Rustfmt check run: cargo fmt --all -- --check @@ -81,11 +69,8 @@ jobs: - name: Install stable toolchain uses: dtolnay/rust-toolchain@stable - - name: Cache cargo build - uses: actions/cache@v3 - with: - path: target - key: ${{ runner.os }}-cargo-build-${{ hashFiles('Cargo.lock') }} + - name: Cache rust dependencies + uses: Swatinem/rust-cache@v2 - name: Run database migrations run: | diff --git a/.github/workflows/dependency-security.yml b/.github/workflows/dependency-security.yml index 4a3f0d65..f860dcd1 100644 --- a/.github/workflows/dependency-security.yml +++ b/.github/workflows/dependency-security.yml @@ -41,11 +41,10 @@ jobs: restore-keys: | ${{ runner.os }}-dependency-security- - - name: Install cargo-audit - run: cargo install cargo-audit --locked - - - name: Install cargo-deny - run: cargo install cargo-deny --locked + - name: Install cargo-audit and cargo-deny + uses: taiki-e/install-action@v2 + with: + tool: cargo-audit,cargo-deny - name: Scan for RustSec advisories run: cargo audit --deny warnings