Skip to content

Commit 373c453

Browse files
committed
chore: Group phpunit runs
Assisted-by: ClaudeCode:claude-opus-5 Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
1 parent a1ee5e0 commit 373c453

11 files changed

Lines changed: 219 additions & 599 deletions

.github/workflows/phpunit-kvstore.yml

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,18 @@
44
name: PHPUnit key-value store
55

66
on:
7-
pull_request:
7+
workflow_call:
88

99
permissions:
1010
contents: read
1111

12-
concurrency:
13-
group: phpunit-kvstore-${{ github.head_ref || github.run_id }}
14-
cancel-in-progress: true
15-
1612
env:
1713
VALKEY_IMAGE: valkey/valkey:8
1814

1915
jobs:
20-
changes:
21-
runs-on: ubuntu-latest-low
22-
23-
outputs:
24-
src: ${{ steps.changes.outputs.src}}
25-
26-
steps:
27-
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
28-
id: changes
29-
continue-on-error: true
30-
with:
31-
filters: |
32-
src:
33-
- '.github/workflows/phpunit-kvstore.yml'
34-
- '3rdparty/**'
35-
- '**/appinfo/**'
36-
- '**.php'
37-
3816
phpunit-kvstore:
3917
runs-on: ubuntu-latest
4018

41-
needs: changes
42-
if: needs.changes.outputs.src != 'false'
43-
4419
strategy:
4520
fail-fast: false
4621
matrix:
@@ -52,7 +27,7 @@ jobs:
5227

5328
steps:
5429
- name: Checkout server
55-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
30+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5631
with:
5732
persist-credentials: false
5833
submodules: true
@@ -125,17 +100,3 @@ jobs:
125100
if: always()
126101
run: |
127102
cat data/nextcloud.log
128-
129-
summary:
130-
permissions:
131-
contents: none
132-
runs-on: ubuntu-latest-low
133-
needs: [changes, phpunit-kvstore]
134-
135-
if: always()
136-
137-
name: phpunit-kvstore-summary
138-
139-
steps:
140-
- name: Summary status
141-
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-kvstore.result != 'success' }}; then exit 1; fi

.github/workflows/phpunit-mariadb.yml

Lines changed: 8 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -9,61 +9,23 @@
99
name: PHPUnit MariaDB
1010

1111
on:
12-
pull_request:
13-
schedule:
14-
- cron: "5 2 * * *"
12+
workflow_call:
1513

1614
permissions:
1715
contents: read
1816

19-
concurrency:
20-
group: phpunit-mariadb-${{ github.head_ref || github.run_id }}
21-
cancel-in-progress: true
22-
2317
jobs:
24-
changes:
25-
runs-on: ubuntu-latest-low
26-
permissions:
27-
contents: read
28-
pull-requests: read
29-
30-
outputs:
31-
src: ${{ steps.changes.outputs.src}}
32-
33-
steps:
34-
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
35-
id: changes
36-
continue-on-error: true
37-
with:
38-
filters: |
39-
src:
40-
- '.github/workflows/**'
41-
- '3rdparty/**'
42-
- '**/appinfo/**'
43-
- '**/lib/**'
44-
- '**/templates/**'
45-
- '**/tests/**'
46-
- 'vendor/**'
47-
- 'vendor-bin/**'
48-
- '.php-cs-fixer.dist.php'
49-
- 'composer.json'
50-
- 'composer.lock'
51-
- '**.php'
52-
5318
phpunit-mariadb:
5419
runs-on: ubuntu-latest
5520

56-
needs: changes
57-
if: needs.changes.outputs.src != 'false'
58-
5921
strategy:
6022
fail-fast: false
6123
matrix:
62-
php-versions: ['8.2']
63-
mariadb-versions: ['10.6']
6424
include:
65-
- php-versions: '8.5'
66-
mariadb-versions: '11.8'
25+
- mariadb-versions: '10.11'
26+
php-versions: '8.3'
27+
- mariadb-versions: '12.3'
28+
php-versions: '8.5'
6729

6830
name: MariaDB ${{ matrix.mariadb-versions }} (PHP ${{ matrix.php-versions }}) - database tests
6931

@@ -87,13 +49,13 @@ jobs:
8749

8850
steps:
8951
- name: Checkout server
90-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
52+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9153
with:
9254
persist-credentials: false
9355
submodules: true
9456

9557
- name: Set up php ${{ matrix.php-versions }}
96-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.37.0
58+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2.37.2
9759
timeout-minutes: 5
9860
with:
9961
php-version: ${{ matrix.php-versions }}
@@ -103,6 +65,7 @@ jobs:
10365
ini-file: development
10466
ini-values: disable_functions=""
10567
env:
68+
fail-fast: true
10669
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10770

10871
- name: Set up dependencies
@@ -128,23 +91,3 @@ jobs:
12891
env:
12992
DB_ROOT_USER: root
13093
DB_ROOT_PASS: rootpassword
131-
132-
- name: Upload test results
133-
if: ${{ !cancelled() }}
134-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
135-
with:
136-
flags: phpunit-mariadb
137-
138-
summary:
139-
permissions:
140-
contents: none
141-
runs-on: ubuntu-latest-low
142-
needs: [changes, phpunit-mariadb]
143-
144-
if: always()
145-
146-
name: phpunit-mariadb-summary
147-
148-
steps:
149-
- name: Summary status
150-
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-mariadb.result != 'success' }}; then exit 1; fi

.github/workflows/phpunit-memcached.yml

Lines changed: 5 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,54 +9,19 @@
99
name: PHPUnit memcached
1010

1111
on:
12-
pull_request:
13-
schedule:
14-
- cron: "5 2 * * *"
12+
workflow_call:
1513

1614
permissions:
1715
contents: read
1816

19-
concurrency:
20-
group: phpunit-memcached-${{ github.head_ref || github.run_id }}
21-
cancel-in-progress: true
22-
2317
jobs:
24-
changes:
25-
runs-on: ubuntu-latest-low
26-
27-
outputs:
28-
src: ${{ steps.changes.outputs.src}}
29-
30-
steps:
31-
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
32-
id: changes
33-
continue-on-error: true
34-
with:
35-
filters: |
36-
src:
37-
- '.github/workflows/**'
38-
- '3rdparty/**'
39-
- '**/appinfo/**'
40-
- '**/lib/**'
41-
- '**/templates/**'
42-
- '**/tests/**'
43-
- 'vendor/**'
44-
- 'vendor-bin/**'
45-
- '.php-cs-fixer.dist.php'
46-
- 'composer.json'
47-
- 'composer.lock'
48-
- '**.php'
49-
5018
phpunit-memcached:
5119
runs-on: ubuntu-latest
5220

53-
needs: changes
54-
if: needs.changes.outputs.src != 'false'
55-
5621
strategy:
5722
fail-fast: false
5823
matrix:
59-
php-versions: ["8.2", "8.5"]
24+
php-versions: ["8.3", "8.5"]
6025

6126
name: Memcached (PHP ${{ matrix.php-versions }})
6227

@@ -68,13 +33,13 @@ jobs:
6833

6934
steps:
7035
- name: Checkout server
71-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
36+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7237
with:
7338
persist-credentials: false
7439
submodules: true
7540

7641
- name: Set up php ${{ matrix.php-versions }}
77-
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f #v2.37.0
42+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 #v2.37.2
7843
timeout-minutes: 5
7944
with:
8045
php-version: ${{ matrix.php-versions }}
@@ -84,6 +49,7 @@ jobs:
8449
ini-file: development
8550
ini-values: disable_functions=""
8651
env:
52+
fail-fast: true
8753
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8854

8955
- name: Set up dependencies
@@ -100,27 +66,7 @@ jobs:
10066
- name: PHPUnit memcached tests
10167
run: composer run test -- --group Memcached --log-junit junit.xml
10268

103-
- name: Upload test results
104-
if: ${{ !cancelled() }}
105-
uses: codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1.2.1
106-
with:
107-
flags: phpunit-memcached
108-
10969
- name: Print logs
11070
if: always()
11171
run: |
11272
cat data/nextcloud.log
113-
114-
summary:
115-
permissions:
116-
contents: none
117-
runs-on: ubuntu-latest-low
118-
needs: [changes, phpunit-memcached]
119-
120-
if: always()
121-
122-
name: phpunit-memcached-summary
123-
124-
steps:
125-
- name: Summary status
126-
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-memcached.result != 'success' }}; then exit 1; fi

0 commit comments

Comments
 (0)