From b4a86ff6741b6a356fedc0168fed355a4dcd130d Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 10 Jun 2022 15:15:37 +0200 Subject: [PATCH] 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) --- .github/workflows/push.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 1be15838039..ec2d00f8e44 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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