Skip to content

Commit bbbbc28

Browse files
committed
Bump phpunit files
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
1 parent b62d6e3 commit bbbbc28

File tree

4 files changed

+131
-11
lines changed

4 files changed

+131
-11
lines changed

.github/workflows/phpunit-mysql.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,31 @@ name: PHPUnit
77

88
on:
99
pull_request:
10+
paths:
11+
- '.github/workflows/**'
12+
- 'appinfo/**'
13+
- 'lib/**'
14+
- 'templates/**'
15+
- 'tests/**'
16+
- 'vendor/**'
17+
- 'vendor-bin/**'
18+
- '.php-cs-fixer.dist.php'
19+
- 'composer.json'
20+
- 'composer.lock'
21+
1022
push:
1123
branches:
24+
- main
1225
- master
1326
- stable*
1427

28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: phpunit-mysql-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
1535
env:
1636
# Location of the phpunit.xml and phpunit.integration.xml files
1737
PHPUNIT_CONFIG: ./tests/phpunit.xml
@@ -23,8 +43,8 @@ jobs:
2343

2444
strategy:
2545
matrix:
26-
php-versions: ['7.3', '7.4', '8.0']
27-
server-versions: ["${{ github.base_ref }}"]
46+
php-versions: ['7.4', '8.0']
47+
server-versions: ['stable23']
2848

2949
services:
3050
mysql:
@@ -66,7 +86,15 @@ jobs:
6686
extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
6787
coverage: none
6888

89+
- name: Check composer file existence
90+
id: check_composer
91+
uses: andstor/file-existence-action@v1
92+
with:
93+
files: apps/${{ env.APP_NAME }}/composer.json
94+
6995
- name: Set up PHPUnit
96+
# Only run if phpunit config file exists
97+
if: steps.check_composer.outputs.files_exists == 'true'
7098
working-directory: apps/${{ env.APP_NAME }}
7199
run: composer i
72100

@@ -76,7 +104,7 @@ jobs:
76104
run: |
77105
mkdir data
78106
./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
79-
./occ app:enable ${{ env.APP_NAME }}
107+
./occ app:enable --force ${{ env.APP_NAME }}
80108
81109
- name: Check PHPUnit config file existence
82110
id: check_phpunit
@@ -108,6 +136,8 @@ jobs:
108136
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
109137

110138
summary:
139+
permissions:
140+
contents: none
111141
runs-on: ubuntu-latest
112142
needs: phpunit-mysql
113143

.github/workflows/phpunit-oci.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,44 @@ name: PHPUnit
77

88
on:
99
pull_request:
10+
paths:
11+
- '.github/workflows/**'
12+
- 'appinfo/**'
13+
- 'lib/**'
14+
- 'templates/**'
15+
- 'tests/**'
16+
- 'vendor/**'
17+
- 'vendor-bin/**'
18+
- '.php-cs-fixer.dist.php'
19+
- 'composer.json'
20+
- 'composer.lock'
21+
1022
push:
1123
branches:
24+
- main
1225
- master
1326
- stable*
1427

28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: phpunit-oci-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
1535
env:
1636
# Location of the phpunit.xml and phpunit.integration.xml files
1737
PHPUNIT_CONFIG: ./tests/phpunit.xml
1838
PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml
1939

2040
jobs:
2141
phpunit-oci:
22-
runs-on: ubuntu-20.04
42+
runs-on: ubuntu-latest
2343

2444
strategy:
2545
matrix:
2646
php-versions: ['8.0']
27-
server-versions: ["${{ github.base_ref }}"]
47+
server-versions: ['stable23']
2848

2949
services:
3050
oracle:
@@ -58,7 +78,15 @@ jobs:
5878
tools: phpunit
5979
coverage: none
6080

81+
- name: Check composer file existence
82+
id: check_composer
83+
uses: andstor/file-existence-action@v1
84+
with:
85+
files: apps/${{ env.APP_NAME }}/composer.json
86+
6187
- name: Set up PHPUnit
88+
# Only run if phpunit config file exists
89+
if: steps.check_composer.outputs.files_exists == 'true'
6290
working-directory: apps/${{ env.APP_NAME }}
6391
run: composer i
6492

@@ -68,7 +96,7 @@ jobs:
6896
run: |
6997
mkdir data
7098
./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
71-
./occ app:enable ${{ env.APP_NAME }}
99+
./occ app:enable --force ${{ env.APP_NAME }}
72100
73101
- name: Check PHPUnit config file existence
74102
id: check_phpunit
@@ -100,6 +128,8 @@ jobs:
100128
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
101129

102130
summary:
131+
permissions:
132+
contents: none
103133
runs-on: ubuntu-latest
104134
needs: phpunit-oci
105135

.github/workflows/phpunit-pgsql.yml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,31 @@ name: PHPUnit
77

88
on:
99
pull_request:
10+
paths:
11+
- '.github/workflows/**'
12+
- 'appinfo/**'
13+
- 'lib/**'
14+
- 'templates/**'
15+
- 'tests/**'
16+
- 'vendor/**'
17+
- 'vendor-bin/**'
18+
- '.php-cs-fixer.dist.php'
19+
- 'composer.json'
20+
- 'composer.lock'
21+
1022
push:
1123
branches:
24+
- main
1225
- master
1326
- stable*
1427

28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: phpunit-pgsql-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
1535
env:
1636
# Location of the phpunit.xml and phpunit.integration.xml files
1737
PHPUNIT_CONFIG: ./tests/phpunit.xml
@@ -24,11 +44,11 @@ jobs:
2444
strategy:
2545
matrix:
2646
php-versions: ['8.0']
27-
server-versions: ["${{ github.base_ref }}"]
47+
server-versions: ['stable23']
2848

2949
services:
3050
postgres:
31-
image: postgres
51+
image: postgres:14
3252
ports:
3353
- 4444:5432/tcp
3454
env:
@@ -63,7 +83,15 @@ jobs:
6383
extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql
6484
coverage: none
6585

86+
- name: Check composer file existence
87+
id: check_composer
88+
uses: andstor/file-existence-action@v1
89+
with:
90+
files: apps/${{ env.APP_NAME }}/composer.json
91+
6692
- name: Set up PHPUnit
93+
# Only run if phpunit config file exists
94+
if: steps.check_composer.outputs.files_exists == 'true'
6795
working-directory: apps/${{ env.APP_NAME }}
6896
run: composer i
6997

@@ -73,7 +101,7 @@ jobs:
73101
run: |
74102
mkdir data
75103
./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
76-
./occ app:enable ${{ env.APP_NAME }}
104+
./occ app:enable --force ${{ env.APP_NAME }}
77105
78106
- name: Check PHPUnit config file existence
79107
id: check_phpunit
@@ -105,6 +133,8 @@ jobs:
105133
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
106134

107135
summary:
136+
permissions:
137+
contents: none
108138
runs-on: ubuntu-latest
109139
needs: phpunit-pgsql
110140

.github/workflows/phpunit-sqlite.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,31 @@ name: PHPUnit
77

88
on:
99
pull_request:
10+
paths:
11+
- '.github/workflows/**'
12+
- 'appinfo/**'
13+
- 'lib/**'
14+
- 'templates/**'
15+
- 'tests/**'
16+
- 'vendor/**'
17+
- 'vendor-bin/**'
18+
- '.php-cs-fixer.dist.php'
19+
- 'composer.json'
20+
- 'composer.lock'
21+
1022
push:
1123
branches:
24+
- main
1225
- master
1326
- stable*
1427

28+
permissions:
29+
contents: read
30+
31+
concurrency:
32+
group: phpunit-sqlite-${{ github.head_ref || github.run_id }}
33+
cancel-in-progress: true
34+
1535
env:
1636
# Location of the phpunit.xml and phpunit.integration.xml files
1737
PHPUNIT_CONFIG: ./tests/phpunit.xml
@@ -24,7 +44,7 @@ jobs:
2444
strategy:
2545
matrix:
2646
php-versions: ['8.0']
27-
server-versions: ["${{ github.base_ref }}"]
47+
server-versions: ['stable23']
2848

2949
steps:
3050
- name: Set app env
@@ -52,7 +72,15 @@ jobs:
5272
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
5373
coverage: none
5474

75+
- name: Check composer file existence
76+
id: check_composer
77+
uses: andstor/file-existence-action@v1
78+
with:
79+
files: apps/${{ env.APP_NAME }}/composer.json
80+
5581
- name: Set up PHPUnit
82+
# Only run if phpunit config file exists
83+
if: steps.check_composer.outputs.files_exists == 'true'
5684
working-directory: apps/${{ env.APP_NAME }}
5785
run: composer i
5886

@@ -62,7 +90,7 @@ jobs:
6290
run: |
6391
mkdir data
6492
./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password
65-
./occ app:enable ${{ env.APP_NAME }}
93+
./occ app:enable --force ${{ env.APP_NAME }}
6694
6795
- name: Check PHPUnit config file existence
6896
id: check_phpunit
@@ -94,6 +122,8 @@ jobs:
94122
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}
95123

96124
summary:
125+
permissions:
126+
contents: none
97127
runs-on: ubuntu-latest
98128
needs: phpunit-sqlite
99129

0 commit comments

Comments
 (0)