From 929a6463ceb0e0d8f8f8e64159e634f91d97b63c Mon Sep 17 00:00:00 2001 From: Naohiro Yoshida Date: Sun, 16 Jun 2024 15:02:55 +0900 Subject: [PATCH] Split CI (#278) --- .github/workflows/ci.yaml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 31a9103c..cf68709c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,8 +10,8 @@ on: types: [labeled] jobs: - common: - name: common + check-lint: + name: check-lint runs-on: ubuntu-latest if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push' steps: @@ -33,6 +33,36 @@ jobs: run: cargo fmt --all -- --check - name: clippy check run: cargo clippy -- -D warnings + check-deps: + name: check-deps + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push' + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{github.event.pull_request.head.repo.full_name}} + - name: cargo-deny + uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --workspace --all-features + foundation: + name: foundation + runs-on: ubuntu-latest + if: contains(github.event.pull_request.labels.*.name, 'safe to test') || ${{ github.event_name }} == 'push' + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.ref }} + repository: ${{github.event.pull_request.head.repo.full_name}} + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + - uses: dtolnay/rust-toolchain@stable - name: Setup gcloud uses: google-github-actions/setup-gcloud@v0.6.0 with: @@ -42,10 +72,6 @@ jobs: run: cargo test --release --all-features --manifest-path foundation/auth/Cargo.toml - name: gax-test run: cargo test --release --all-features --manifest-path foundation/gax/Cargo.toml - - name: cargo-deny - uses: EmbarkStudios/cargo-deny-action@v1 - with: - arguments: --workspace --all-features pubsub: name: pubsub runs-on: ubuntu-latest