From c763feed4d18db020fb5504159c8e06f446cc2ef Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Mon, 20 Jan 2025 00:56:25 +0900 Subject: [PATCH] ci: Use reusable workflows for fmt and security_audit --- .github/workflows/ci.yml | 34 ++++++++++------------------------ 1 file changed, 10 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a9ce357..fff650c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,16 @@ env: RUST_BACKTRACE: 1 jobs: + fmt: + uses: smol-rs/.github/.github/workflows/fmt.yml@main + security_audit: + uses: smol-rs/.github/.github/workflows/security_audit.yml@main + permissions: + checks: write + contents: read + issues: write + secrets: inherit + test: runs-on: ${{ matrix.os }} strategy: @@ -53,27 +63,3 @@ jobs: - name: Install Rust run: rustup update stable - run: cargo clippy --all-features --all-targets - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Rust - run: rustup update stable - - run: cargo fmt --all --check - - security_audit: - permissions: - checks: write - contents: read - issues: write - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - # rustsec/audit-check used to do this automatically - - name: Generate Cargo.lock - run: cargo generate-lockfile - # https://github.com/rustsec/audit-check/issues/2 - - uses: rustsec/audit-check@v2.0.0 - with: - token: ${{ secrets.GITHUB_TOKEN }}