Skip to content

Commit 1c005f8

Browse files
committed
Manual backport #877
Backport #877 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
1 parent 2299643 commit 1c005f8

4 files changed

Lines changed: 59 additions & 23 deletions

File tree

.github/workflows/phpunit-mysql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
strategy:
4040
matrix:
41-
php-versions: ['8.0', '8.1']
41+
php-versions: ['8.0', '8.1', '8.2']
4242
server-versions: ['stable27']
4343

4444
services:

.github/workflows/phpunit-oci.yml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: PHPUnit
6+
name: PHPUnit OCI
77

88
on:
99
pull_request:
@@ -39,38 +39,55 @@ jobs:
3939
strategy:
4040
matrix:
4141
php-versions: ['8.0']
42-
server-versions: ['stable27']
42+
server-versions: ['master']
4343

4444
services:
4545
oracle:
46-
image: deepdiver/docker-oracle-xe-11g # 'wnameless/oracle-xe-11g-r2'
46+
image: ghcr.io/gvenzl/oracle-xe:11
47+
48+
# Provide passwords and other environment variables to container
49+
env:
50+
ORACLE_RANDOM_PASSWORD: true
51+
APP_USER: autotest
52+
APP_USER_PASSWORD: owncloud
53+
54+
# Forward Oracle port
4755
ports:
4856
- 1521:1521/tcp
4957

58+
# Provide healthcheck script options for startup
59+
options: >-
60+
--health-cmd healthcheck.sh
61+
--health-interval 10s
62+
--health-timeout 5s
63+
--health-retries 10
64+
5065
steps:
5166
- name: Set app env
5267
run: |
5368
# Split and keep last
5469
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
5570
5671
- name: Checkout server
57-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
72+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5873
with:
5974
submodules: true
6075
repository: nextcloud/server
6176
ref: ${{ matrix.server-versions }}
6277

6378
- name: Checkout app
64-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
79+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
6580
with:
6681
path: apps/${{ env.APP_NAME }}
6782

6883
- name: Set up php ${{ matrix.php-versions }}
69-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
84+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
7085
with:
7186
php-version: ${{ matrix.php-versions }}
72-
extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, oci8
87+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
88+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8
7389
coverage: none
90+
ini-file: development
7491
env:
7592
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7693

@@ -125,6 +142,11 @@ jobs:
125142
working-directory: apps/${{ env.APP_NAME }}
126143
run: composer run test:integration
127144

145+
- name: Print logs
146+
if: always()
147+
run: |
148+
cat data/nextcloud.log
149+
128150
- name: Skipped
129151
# Fail the action when neither unit nor integration tests ran
130152
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'

.github/workflows/phpunit-pgsql.yml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: PHPUnit
6+
name: PHPUnit pgsql
77

88
on:
99
pull_request:
@@ -39,11 +39,11 @@ jobs:
3939
strategy:
4040
matrix:
4141
php-versions: ['8.0']
42-
server-versions: ['stable27']
42+
server-versions: ['master']
4343

4444
services:
4545
postgres:
46-
image: postgres:14
46+
image: ghcr.io/nextcloud/continuous-integration-postgres-14:latest
4747
ports:
4848
- 4444:5432/tcp
4949
env:
@@ -59,23 +59,25 @@ jobs:
5959
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
6060
6161
- name: Checkout server
62-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
62+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
6363
with:
6464
submodules: true
6565
repository: nextcloud/server
6666
ref: ${{ matrix.server-versions }}
6767

6868
- name: Checkout app
69-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
69+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
7070
with:
7171
path: apps/${{ env.APP_NAME }}
7272

7373
- name: Set up php ${{ matrix.php-versions }}
74-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
74+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
7575
with:
7676
php-version: ${{ matrix.php-versions }}
77-
extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql
77+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
78+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, pgsql, pdo_pgsql
7879
coverage: none
80+
ini-file: development
7981
env:
8082
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8183

@@ -96,7 +98,7 @@ jobs:
9698
DB_PORT: 4444
9799
run: |
98100
mkdir data
99-
./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
101+
./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 admin
100102
./occ app:enable --force ${{ env.APP_NAME }}
101103
102104
- name: Check PHPUnit script is defined
@@ -130,6 +132,11 @@ jobs:
130132
working-directory: apps/${{ env.APP_NAME }}
131133
run: composer run test:integration
132134

135+
- name: Print logs
136+
if: always()
137+
run: |
138+
cat data/nextcloud.log
139+
133140
- name: Skipped
134141
# Fail the action when neither unit nor integration tests ran
135142
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'

.github/workflows/phpunit-sqlite.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# https://github.com/nextcloud/.github
44
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
55

6-
name: PHPUnit
6+
name: PHPUnit sqlite
77

88
on:
99
pull_request:
@@ -39,7 +39,7 @@ jobs:
3939
strategy:
4040
matrix:
4141
php-versions: ['8.0']
42-
server-versions: ['stable27']
42+
server-versions: ['master']
4343

4444
steps:
4545
- name: Set app env
@@ -48,23 +48,25 @@ jobs:
4848
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
4949
5050
- name: Checkout server
51-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
51+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5252
with:
5353
submodules: true
5454
repository: nextcloud/server
5555
ref: ${{ matrix.server-versions }}
5656

5757
- name: Checkout app
58-
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
58+
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
5959
with:
6060
path: apps/${{ env.APP_NAME }}
6161

6262
- name: Set up php ${{ matrix.php-versions }}
63-
uses: shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
63+
uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
6464
with:
6565
php-version: ${{ matrix.php-versions }}
66-
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
66+
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
67+
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
6768
coverage: none
69+
ini-file: development
6870
env:
6971
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7072

@@ -85,7 +87,7 @@ jobs:
8587
DB_PORT: 4444
8688
run: |
8789
mkdir data
88-
./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
90+
./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 admin
8991
./occ app:enable --force ${{ env.APP_NAME }}
9092
9193
- name: Check PHPUnit script is defined
@@ -119,6 +121,11 @@ jobs:
119121
working-directory: apps/${{ env.APP_NAME }}
120122
run: composer run test:integration
121123

124+
- name: Print logs
125+
if: always()
126+
run: |
127+
cat data/nextcloud.log
128+
122129
- name: Skipped
123130
# Fail the action when neither unit nor integration tests ran
124131
if: steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'

0 commit comments

Comments
 (0)