build(actions): add concurrency and timeouts for GitHub Actions

This commit is contained in:
Jacob Bednarz 2024-07-19 04:46:16 +10:00
parent 0aed308b80
commit e77994f968
No known key found for this signature in database
GPG key ID: 9846E532AF49C75E
2 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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: