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 mysql
77
88on :
99 pull_request :
@@ -38,12 +38,12 @@ jobs:
3838
3939 strategy :
4040 matrix :
41- php-versions : ['8.0', '8.1']
42- server-versions : ['master', 'stable26' ]
41+ php-versions : ['8.0', '8.1', '8.2' ]
42+ server-versions : ['master']
4343
4444 services :
4545 mysql :
46- image : mariadb: 10.5
46+ image : ghcr.io/nextcloud/continuous-integration- mariadb- 10.6:latest
4747 ports :
4848 - 4444:3306/tcp
4949 env :
@@ -58,27 +58,30 @@ jobs:
5858
5959 - name : Enable ONLY_FULL_GROUP_BY MySQL option
6060 run : |
61+ sleep 20
6162 echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
6263 echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword
6364
6465 - name : Checkout server
65- uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
66+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
6667 with :
6768 submodules : true
6869 repository : nextcloud/server
6970 ref : ${{ matrix.server-versions }}
7071
7172 - name : Checkout app
72- uses : actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3
73+ uses : actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
7374 with :
7475 path : apps/${{ env.APP_NAME }}
7576
7677 - name : Set up php ${{ matrix.php-versions }}
77- uses : shivammathur/setup-php@1a18b2267f80291a81ca1d33e7c851fe09e7dfc4 # v2
78+ uses : shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d # v2
7879 with :
7980 php-version : ${{ matrix.php-versions }}
80- extensions : mbstring, iconv, fileinfo, intl, mysql, pdo_mysql
81+ # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
82+ extensions : bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, mysql, pdo_mysql
8183 coverage : none
84+ ini-file : development
8285 env :
8386 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8487
99102 DB_PORT : 4444
100103 run : |
101104 mkdir data
102- ./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
105+ ./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 admin
103106 ./occ app:enable --force ${{ env.APP_NAME }}
104107
105108 - name : Check PHPUnit script is defined
@@ -133,6 +136,11 @@ jobs:
133136 working-directory : apps/${{ env.APP_NAME }}
134137 run : composer run test:integration
135138
139+ - name : Print logs
140+ if : always()
141+ run : |
142+ cat data/nextcloud.log
143+
136144 - name : Skipped
137145 # Fail the action when neither unit nor integration tests ran
138146 if : steps.check_phpunit.outcome == 'failure' && steps.check_integration.outcome == 'failure'
0 commit comments