Skip to content

Commit e753585

Browse files
committed
feat(github-workflows): improve specs with concurrency, permissions, and timeouts
1 parent 759a246 commit e753585

File tree

8 files changed

+64
-0
lines changed

8 files changed

+64
-0
lines changed

.github/workflows/coding-standards.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ on:
2323
- src/**
2424
- tests/**
2525

26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: read
32+
pull-requests: write
33+
2634
jobs:
2735
coding-standards:
2836
name: "Coding Standards"

.github/workflows/composer-lint.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ on:
1313
paths:
1414
- .github/workflows/composer-lint.yml
1515
- "composer.json"
16+
workflow_dispatch:
17+
18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read
1624

1725
jobs:
1826
composer-lint:

.github/workflows/continuous-integration.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,20 @@ on:
2525
- templates/**
2626
- tests/**
2727

28+
concurrency:
29+
group: ${{ github.workflow }}-${{ github.ref }}
30+
cancel-in-progress: true
31+
32+
permissions:
33+
contents: read
34+
checks: write
35+
pull-requests: write
36+
2837
jobs:
2938
phpunit:
3039
name: "PHPUnit"
3140
runs-on: "ubuntu-latest"
41+
timeout-minutes: 10
3242
env:
3343
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
3444
SYMFONY_DEPRECATIONS_HELPER: weak
@@ -131,6 +141,7 @@ jobs:
131141
upload_coverage:
132142
name: "Upload coverage to Codecov"
133143
runs-on: "ubuntu-latest"
144+
timeout-minutes: 5
134145
# Only run on PRs from forks or PRs from branches that do not match `*.x`
135146
if: "github.event.pull_request.head.repo.full_name != github.repository || !contains(github.event.pull_request.head.ref, '.x')"
136147
needs:
@@ -151,5 +162,6 @@ jobs:
151162
uses: "codecov/codecov-action@v5"
152163
with:
153164
directory: reports
165+
fail_ci_if_error: false
154166
env:
155167
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

.github/workflows/documentation.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ on:
1414
- ".github/workflows/documentation.yml"
1515
- "docs/**"
1616

17+
concurrency:
18+
group: ${{ github.workflow }}-${{ github.ref }}
19+
cancel-in-progress: true
20+
21+
permissions:
22+
contents: read
23+
1724
jobs:
1825
documentation:
1926
name: "Documentation"

.github/workflows/release-on-milestone-closed.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ on:
44
milestone:
55
types:
66
- "closed"
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: write
11+
issues: write
12+
pull-requests: write
713

814
jobs:
915
release:

.github/workflows/static-analysis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ on:
2323
- src/**
2424
- tests/**
2525

26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
permissions:
31+
contents: read
32+
checks: write
33+
2634
jobs:
2735
static-analysis:
2836
name: "Static Analysis"

.github/workflows/test-dev-stability.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@ on:
55
schedule:
66
- cron: "0 0 * * 0"
77

8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
contents: read
14+
815
jobs:
916
phpunit:
1017
name: "PHPUnit"
1118
runs-on: "ubuntu-latest"
19+
timeout-minutes: 10
1220
env:
1321
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
1422

.github/workflows/website-schema.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ on:
1515
- ".doctrine-project.json"
1616
- ".github/workflows/website-schema.yml"
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.ref }}
20+
cancel-in-progress: true
21+
22+
permissions:
23+
contents: read
24+
1825
jobs:
1926
json-validate:
2027
name: "Validate JSON schema"

0 commit comments

Comments
 (0)