Skip to content

Commit 3bc8692

Browse files
authored
GitHub Actions: Update typisttech/.github to v3 (#27)
1 parent d5cde42 commit 3bc8692

File tree

10 files changed

+107
-108
lines changed

10 files changed

+107
-108
lines changed

.github/codecov.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

.github/workflows/audit.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Audit
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '12 3 * * 1' # Weekly on Monday
7+
pull_request:
8+
branches:
9+
- main
10+
push:
11+
branches:
12+
- main
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref_name }}
16+
cancel-in-progress: true
17+
18+
permissions:
19+
contents: read
20+
21+
jobs:
22+
php:
23+
uses: typisttech/.github/.github/workflows/audit-php.yml@v3

.github/workflows/composer-audit.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/composer-normalize.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/dependabot-auto-merge.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@ concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
1010
cancel-in-progress: true
1111

12-
permissions: {}
12+
permissions:
13+
contents: write
14+
pull-requests: write
1315

1416
jobs:
1517
dependabot:
16-
permissions:
17-
contents: write
18-
pull-requests: write
19-
uses: typisttech/.github/.github/workflows/dependabot-auto-merge.yml@v2
18+
uses: typisttech/.github/.github/workflows/dependabot-auto-merge.yml@v3
2019
with:
2120
minor: true
2221
patch: true

.github/workflows/format.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Format
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref_name }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
php:
19+
uses: typisttech/.github/.github/workflows/format-php.yml@v3
20+
secrets: inherit

.github/workflows/lint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Lint
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- main
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
14+
cancel-in-progress: true
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
php:
21+
uses: typisttech/.github/.github/workflows/lint-php.yml@v3
22+
with:
23+
phpstan: false

.github/workflows/pint.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ permissions: {}
1414

1515
jobs:
1616
release-drafter:
17-
uses: typisttech/.github/.github/workflows/release-drafter.yml@v2
17+
runs-on: ubuntu-latest
1818
permissions:
1919
contents: write
2020
pull-requests: read
21+
steps:
22+
- uses: release-drafter/release-drafter@v6
23+
env:
24+
GITHUB_TOKEN: ${{ github.token }} # Not a typo.

.github/workflows/test.yml

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
push:
99
branches:
1010
- main
11+
tags:
12+
- '**'
1113

1214
concurrency:
1315
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
@@ -17,42 +19,45 @@ permissions: {}
1719

1820
jobs:
1921
php-matrix:
20-
uses: typisttech/.github/.github/workflows/php-matrix.yml@v2
21-
permissions:
22-
contents: read
22+
runs-on: ubuntu-latest
23+
outputs:
24+
versions: ${{ steps.php-matrix.outputs.versions }}
25+
highest: ${{ steps.php-matrix.outputs.highest }}
26+
steps:
27+
- uses: actions/checkout@v5
28+
with:
29+
sparse-checkout: composer.json
30+
sparse-checkout-cone-mode: false
31+
32+
- uses: typisttech/php-matrix-action@v2
33+
id: php-matrix
2334

2435
pest:
25-
runs-on: ubuntu-latest
2636
needs: php-matrix
2737
strategy:
2838
matrix:
29-
php: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
30-
dependency-versions: [lowest, highest]
31-
coverage: [none]
39+
php-version: ${{ fromJSON(needs.php-matrix.outputs.versions) }}
40+
coverage: ['none']
3241
exclude:
33-
- php: ${{ needs.php-matrix.outputs.highest }}
34-
dependency-versions: highest
35-
coverage: none
42+
- php-version: ${{ needs.php-matrix.outputs.highest }}
43+
coverage: 'none'
3644
include:
37-
- php: ${{ needs.php-matrix.outputs.highest }}
38-
dependency-versions: highest
45+
- php-version: ${{ needs.php-matrix.outputs.highest }}
3946
coverage: xdebug
47+
runs-on: ubuntu-latest
4048
steps:
4149
- uses: actions/checkout@v5
4250

4351
- uses: shivammathur/setup-php@v2
4452
with:
45-
php-version: ${{ matrix.php }}
53+
php-version: ${{ matrix.php-version }}
4654
coverage: ${{ matrix.coverage }}
47-
env:
48-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4955

5056
- uses: ramsey/composer-install@v3
5157
with:
52-
dependency-versions: ${{ matrix.dependency-versions }}
53-
composer-options: --no-audit --optimize-autoloader
58+
dependency-versions: highest
5459

55-
- run: composer pest:unit -- --ci --coverage-clover coverage.xml
60+
- run: composer pest:unit -- --ci --coverage-clover coverage-unit.xml
5661
if: ${{ matrix.coverage == 'xdebug' }}
5762

5863
- run: composer pest:unit -- --ci
@@ -65,17 +70,24 @@ jobs:
6570
if: ${{ matrix.coverage == 'xdebug' }}
6671
with:
6772
name: coverage
68-
path: coverage.xml
73+
path: coverage-unit.xml
6974

7075
codecov:
7176
needs: pest
7277
runs-on: ubuntu-latest
7378
permissions:
7479
id-token: write
7580
steps:
81+
- uses: actions/checkout@v5
82+
7683
- uses: actions/download-artifact@v5
7784
with:
7885
name: coverage
86+
7987
- uses: codecov/codecov-action@v5
8088
with:
81-
use_oidc: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork) }}
89+
use_oidc: true
90+
fail_ci_if_error: true
91+
disable_search: true
92+
files: coverage-unit.xml
93+
flags: unit

0 commit comments

Comments
 (0)