Skip to content

Commit f43b07f

Browse files
committed
fixup! Move travis phpunit to github actions
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
1 parent b56de15 commit f43b07f

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/phpunit.yml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ jobs:
1515
# do not stop on another job's failure
1616
fail-fast: false
1717
matrix:
18-
php-versions: ['7.2', '7.3', '7.4']
19-
databases: ['sqlite', 'mysql']
18+
php-versions: ['7.4']
19+
databases: ['mysql']
2020
server-versions: ['master']
2121

2222
name: php${{ matrix.php-versions }}/${{ matrix.databases }} on ${{ matrix.server-versions }}
2323

2424
services:
25-
mariadb:
26-
image: mariadb:latest
25+
mysql:
26+
image: mariadb
2727
ports:
28-
- 3306
28+
- 3306/tcp
2929
env:
3030
MYSQL_USER: nextcloud
3131
MYSQL_PASSWORD: password
32-
MYSQL_DATABASE: nextcloud
3332
MYSQL_ROOT_PASSWORD: rootpassword
3433
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3
3534
# postgres:
@@ -46,7 +45,7 @@ jobs:
4645
uses: actions/checkout@v2
4746
with:
4847
repository: nextcloud/server
49-
ref: ${{ matrix.server-versions }}
48+
ref: test/debug-install
5049
- name: Checkout submodules
5150
shell: bash
5251
run: |
@@ -62,17 +61,23 @@ jobs:
6261
with:
6362
php-version: ${{ matrix.php-versions }}
6463
tools: phpunit
65-
extensions: intl, pdo_mysql, pdo_pgsql
64+
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, mysql, pdo_mysql, pgsql, pdo_pgsql
6665
coverage: none
66+
- name: Verify MariaDB connection
67+
env:
68+
# get the random port from the service
69+
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
70+
run: mysql --host=127.0.0.1 --port=$DB_PORT -uroot -prootpassword -e "SHOW DATABASES;"
71+
6772
- name: Set up nextcloud
6873
env:
6974
# get the random port from the service
70-
DB_PORT: ${{ job.services.mariadb.ports['3306'] }}
75+
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
7176
run: |
7277
pwd
7378
ls -la
7479
mkdir data
75-
./occ maintenance:install --verbose --database=${{ matrix.databases }} --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
80+
./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=nextcloud --database-pass=password --admin-user admin --admin-pass password
7681
./occ app:enable notestutorial
7782
php -S localhost:8080 &
7883
- name: PHPUnit

0 commit comments

Comments
 (0)