MDL-73212 gha: Allow parameters to be passed via secret

We are disabling the -v (verbose) option, used by default. Still,
now we support a secret (that can be added to everyone's repository)
to accept any PHPUnit's command line options and run the tests with
them.

Some examples:

phpunit_options = -v (to keep the verbose option enabled)
phpunit_options = --testdox (to print information about every test...)

... (basically anything supported by the CLI)

Also, we are raising here the environment from Ubuntu 18.04 to 20.04

(self tested by GHA, heh)
This commit is contained in:
Eloy Lafuente (stronk7)
2022-06-21 16:52:36 +02:00
parent 8303206ae0
commit 146d84ebde
+5 -4
View File
@@ -13,7 +13,7 @@ env:
jobs:
Grunt:
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- name: Checking out code
@@ -54,11 +54,11 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-18.04
- os: ubuntu-20.04
php: 7.3
extensions:
db: mysqli
- os: ubuntu-18.04
- os: ubuntu-20.04
php: 8.0
db: pgsql
extensions: xmlrpc-beta
@@ -111,4 +111,5 @@ jobs:
- name: Running PHPUnit tests
env:
dbtype: ${{ matrix.db }}
run: vendor/bin/phpunit -v
phpunit_options: ${{ secrets.phpunit_options }}
run: vendor/bin/phpunit $phpunit_options