2
2
#
3
3
# https://github.com/nextcloud/.github
4
4
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5
+ #
6
+ # SPDX-FileCopyrightText: 2023-2024 Nextcloud GmbH and Nextcloud contributors
7
+ # SPDX-License-Identifier: MIT
5
8
6
9
name : PHPUnit MariaDB
7
10
@@ -22,14 +25,19 @@ jobs:
22
25
server-max : ${{ steps.versions.outputs.branches-max-list }}
23
26
steps :
24
27
- name : Checkout app
25
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
28
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
29
+ with :
30
+ persist-credentials : false
26
31
27
32
- name : Get version matrix
28
33
id : versions
29
34
uses : icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
30
35
31
36
changes :
32
37
runs-on : ubuntu-latest-low
38
+ permissions :
39
+ contents : read
40
+ pull-requests : read
33
41
34
42
outputs :
35
43
src : ${{ steps.changes.outputs.src}}
62
70
matrix :
63
71
php-versions : ${{ fromJson(needs.matrix.outputs.php-version) }}
64
72
server-versions : ${{ fromJson(needs.matrix.outputs.server-max) }}
65
- mariadb-versions : ['10.6', '10.11 ']
73
+ mariadb-versions : ['10.6', '11.4 ']
66
74
67
75
name : MariaDB ${{ matrix.mariadb-versions }} PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
68
76
@@ -72,54 +80,61 @@ jobs:
72
80
ports :
73
81
- 4444:3306/tcp
74
82
env :
75
- MYSQL_ROOT_PASSWORD : rootpassword
76
- options : --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5
83
+ MARIADB_ROOT_PASSWORD : rootpassword
84
+ options : --health-cmd="mariadb-admin ping" --health-interval 5s --health-timeout 2s --health-retries 5
77
85
78
86
steps :
79
87
- name : Set app env
88
+ if : ${{ env.APP_NAME == '' }}
80
89
run : |
81
90
# Split and keep last
82
91
echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV
83
92
84
93
- name : Checkout server
85
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
94
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
86
95
with :
96
+ persist-credentials : false
87
97
submodules : true
88
98
repository : nextcloud/server
89
99
ref : ${{ matrix.server-versions }}
90
100
91
101
- name : Checkout app
92
- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
102
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
93
103
with :
104
+ persist-credentials : false
94
105
path : apps/${{ env.APP_NAME }}
95
106
96
107
- name : Set up php ${{ matrix.php-versions }}
97
- uses : shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2
108
+ uses : shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2.31.1
98
109
with :
99
110
php-version : ${{ matrix.php-versions }}
100
111
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
101
112
extensions : bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
102
113
coverage : none
103
114
ini-file : development
115
+ # Temporary workaround for missing pcntl_* in PHP 8.3
116
+ ini-values : disable_functions=
104
117
env :
105
118
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
106
119
107
120
- name : Enable ONLY_FULL_GROUP_BY MariaDB option
108
121
run : |
109
122
echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
110
- echo " SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
123
+ echo ' SELECT @@sql_mode;' | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
111
124
112
125
- name : Check composer file existence
113
126
id : check_composer
114
- uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v2
127
+ uses : andstor/file-existence-action@076e0072799f4942c8bc574a82233e1e4d13e9d6 # v3.0.0
115
128
with :
116
129
files : apps/${{ env.APP_NAME }}/composer.json
117
130
118
131
- name : Set up dependencies
119
132
# Only run if phpunit config file exists
120
133
if : steps.check_composer.outputs.files_exists == 'true'
121
134
working-directory : apps/${{ env.APP_NAME }}
122
- run : composer i
135
+ run : |
136
+ composer remove nextcloud/ocp --dev
137
+ composer i
123
138
124
139
- name : Set up Nextcloud
125
140
env :
@@ -134,7 +149,7 @@ jobs:
134
149
continue-on-error : true
135
150
working-directory : apps/${{ env.APP_NAME }}
136
151
run : |
137
- composer run --list | grep " ^ test:unit " | wc -l | grep 1
152
+ composer run --list | grep ' ^ test:unit ' | wc -l | grep 1
138
153
139
154
- name : PHPUnit
140
155
# Only run if phpunit config file exists
@@ -147,7 +162,7 @@ jobs:
147
162
continue-on-error : true
148
163
working-directory : apps/${{ env.APP_NAME }}
149
164
run : |
150
- composer run --list | grep " ^ test:integration " | wc -l | grep 1
165
+ composer run --list | grep ' ^ test:integration ' | wc -l | grep 1
151
166
152
167
- name : Run Nextcloud
153
168
# Only run if phpunit integration config file exists
0 commit comments