From e77994f968bebedb396a15e40a985ba00bb98210 Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Fri, 19 Jul 2024 04:46:16 +1000 Subject: [PATCH] build(actions): add concurrency and timeouts for GitHub Actions --- .github/workflows/ci.yml | 11 +++++++++-- .github/workflows/release-doctor.yml | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e26df5bda31..e860916e469 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,5 @@ name: CI + on: push: branches: @@ -8,11 +9,15 @@ on: - main - next +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: lint: name: lint runs-on: ubuntu-latest - + timeout-minutes: 5 steps: - uses: actions/checkout@v4 @@ -33,6 +38,7 @@ jobs: test: name: test runs-on: ubuntu-latest + timeout-minutes: 10 steps: - uses: actions/checkout@v4 @@ -53,6 +59,7 @@ jobs: examples: name: examples runs-on: ubuntu-latest + timeout-minutes: 5 steps: - uses: actions/checkout@v4 @@ -68,7 +75,7 @@ jobs: run: | rye sync --all-features - - env: + - env: CLOUDFLARE_ACCOUNT_ID: f037e56e89293a057740de681ac9abbe CLOUDFLARE_EMAIL: terraform-acceptance-test@cfapi.net CLOUDFLARE_ZONE_ID: 0da42c8d2132a9ddaf714f9e7c92011 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index e0dcf0f4660..1c932dfe391 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -1,12 +1,18 @@ name: Release Doctor + on: pull_request: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: release_doctor: name: release doctor runs-on: ubuntu-latest + timeout-minutes: 2 if: github.repository == 'cloudflare/cloudflare-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: