Skip to content

Commit 32d8280

Browse files
authored
Update reuseable workflows; Ignore composer.lock (#7)
1 parent c23e361 commit 32d8280

File tree

8 files changed

+39
-5514
lines changed

8 files changed

+39
-5514
lines changed

.github/release-drafter.yml

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1 @@
1-
name-template: 'v$RESOLVED_VERSION'
2-
tag-template: 'v$RESOLVED_VERSION'
3-
4-
template: |
5-
# What's Changed
6-
7-
$CHANGES
8-
9-
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION
10-
11-
categories:
12-
- title: '️:arrow_up: Dependencies'
13-
collapse-after: 3
14-
labels:
15-
- dependencies
16-
- title: ':robot: Automated Commits'
17-
collapse-after: 3
18-
labels:
19-
- tastendruck
20-
- github_actions
1+
_extends: .github

.github/workflows/composer-audit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ on:
77
push:
88
branches:
99
- main
10+
paths:
11+
- .github/workflows/composer-audit.yml
12+
- composer.*
1013

1114
concurrency:
1215
group: ${{ github.workflow }}-${{ github.ref_name }}

.github/workflows/pint.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@ on:
66
branches:
77
- main
88
paths:
9+
- .github/workflows/pint.yml
910
- '**.php'
10-
- 'composer.json'
11-
- 'composer.lock'
12-
- 'pint.json'
13-
- '.github/workflows/pint.yml'
11+
- composer.*
12+
- pint.json
1413

1514
concurrency:
1615
group: ${{ github.workflow }}-${{ github.ref_name }}

.github/workflows/release-drafter.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,8 @@ on:
99
permissions: {}
1010

1111
jobs:
12-
update-release-draft:
13-
runs-on: ubuntu-latest
12+
release-drafter:
13+
uses: typisttech/.github/.github/workflows/release-drafter.yml@v2
1414
permissions:
1515
contents: write
1616
pull-requests: read
17-
steps:
18-
- uses: release-drafter/release-drafter@v6
19-
env:
20-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,26 +18,35 @@ permissions: {}
1818
jobs:
1919
pest:
2020
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
include:
24+
- dependency-versions: lowest
25+
coverage: none
26+
- dependency-versions: highest
27+
coverage: xdebug
2128
steps:
2229
- uses: actions/checkout@v4
2330

2431
- uses: shivammathur/setup-php@v2
2532
with:
2633
php-version: '8.4'
27-
coverage: xdebug
34+
coverage: ${{ matrix.coverage }}
2835
env:
2936
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3037

3138
- uses: ramsey/composer-install@v3
3239
with:
33-
composer-options: --optimize-autoloader
40+
dependency-versions: ${{ matrix.dependency-versions }}
41+
composer-options: --no-audit --optimize-autoloader
3442

3543
# TODO: `--fail-on-incomplete` doesn't fail
3644
# See: https://github.com/pestphp/pest/issues/1328
3745
- run: composer pest:unit -- --coverage-clover coverage-unit.xml --ci --bail --stop-on-incomplete --fail-on-incomplete
3846
- run: composer pest:feature -- --coverage-clover coverage-feature.xml --ci --bail --stop-on-incomplete --fail-on-incomplete
3947

4048
- uses: actions/upload-artifact@v4
49+
if: matrix.coverage == 'xdebug'
4150
with:
4251
name: coverage
4352
path: |
@@ -47,6 +56,9 @@ jobs:
4756
e2e:
4857
needs: pest
4958
runs-on: ubuntu-latest
59+
strategy:
60+
matrix:
61+
dependency-versions: [lowest, highest]
5062
steps:
5163
- uses: actions/checkout@v4
5264

@@ -59,7 +71,8 @@ jobs:
5971

6072
- uses: ramsey/composer-install@v3
6173
with:
62-
composer-options: --optimize-autoloader
74+
dependency-versions: ${{ matrix.dependency-versions }}
75+
composer-options: --no-audit --optimize-autoloader
6376

6477
# TODO: `--fail-on-incomplete` doesn't fail
6578
# See: https://github.com/pestphp/pest/issues/1328

.github/workflows/update-data.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@ name: Update Data
33
on:
44
workflow_dispatch:
55
schedule:
6-
- cron: '13 3 * * 1' # Weekly on Monday
6+
- cron: 13 3 * * 1 # Weekly on Monday
7+
push:
8+
branches:
9+
- main
10+
paths-ignore:
11+
- .github/**
12+
- .gitattributes
13+
- .gitignore
14+
- LICENSE
15+
- pint.json
16+
- README.md
17+
- '!.github/workflows/update-data.yml'
718

819
concurrency:
920
group: ${{ github.workflow }}-${{ github.ref_name }}
@@ -20,8 +31,5 @@ jobs:
2031
command: composer data:update
2132
php-version: '8.4'
2233
branch: "tastendruck/github_actions/update-data/${{ github.ref_name }}"
23-
labels: |
24-
tastendruck
25-
github_actions
26-
update-data
34+
labels: update_data
2735
secrets: inherit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
### Composer template
22
composer.phar
3+
composer.lock
34
/vendor/
45
/coverage*.xml

0 commit comments

Comments
 (0)