Merge pull request #1729 from nextcloud/fix/oci-ci

fix(tests): Update phpunit workflow to fix OCI tests
This commit is contained in:
Ferdinand Thiessen 2023-09-29 15:43:56 +02:00 коммит произвёл GitHub
Родитель c26470bc1a 0ca71be864
Коммит 938228e106
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 15 добавлений и 8 удалений

23
.github/workflows/phpunit.yml поставляемый
Просмотреть файл

@ -245,13 +245,17 @@ jobs:
services: services:
oracle: oracle:
image: ghcr.io/gvenzl/oracle-xe:11 image: ghcr.io/gvenzl/oracle-xe:11
ports:
- 4444:1521/tcp
# Provide passwords and other environment variables to container # Provide passwords and other environment variables to container
env: env:
ORACLE_RANDOM_PASSWORD: true ORACLE_RANDOM_PASSWORD: true
APP_USER: autotest APP_USER: autotest
APP_USER_PASSWORD: owncloud APP_USER_PASSWORD: nextcloud
# Forward Oracle port
ports:
- 1521:1521/tcp
# Provide healthcheck script options for startup # Provide healthcheck script options for startup
options: >- options: >-
--health-cmd healthcheck.sh --health-cmd healthcheck.sh
@ -273,12 +277,15 @@ jobs:
path: apps/${{ env.APP_NAME }} path: apps/${{ env.APP_NAME }}
- name: Set up php ${{ matrix.php-versions }} - name: Set up php ${{ matrix.php-versions }}
uses: "shivammathur/setup-php@v2" uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
tools: phpunit # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
extensions: mbstring, iconv, fileinfo, intl, oci8, zip, gd extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, oci8
coverage: none coverage: none
ini-file: development
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Set up PHPUnit - name: Set up PHPUnit
working-directory: apps/${{ env.APP_NAME }} working-directory: apps/${{ env.APP_NAME }}
@ -286,11 +293,11 @@ jobs:
- name: Set up Nextcloud - name: Set up Nextcloud
env: env:
DB_PORT: 4444 DB_PORT: 1521
OC_PASS: test OC_PASS: test
run: | run: |
mkdir data mkdir data
./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 ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=nextcloud --admin-user admin --admin-pass admin
./occ user:add --password-from-env --display-name="Test Displayname" test ./occ user:add --password-from-env --display-name="Test Displayname" test
./occ user:add --password-from-env --display-name="User No. 1" user1 ./occ user:add --password-from-env --display-name="User No. 1" user1
./occ app:enable --force ${{ env.APP_NAME }} ./occ app:enable --force ${{ env.APP_NAME }}