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
88on :
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
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'
0 commit comments