diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2022-10-20 16:39:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-20 16:39:26 +0300 |
commit | a69c282d65e8f710b1cd010f6332b5263d62a206 (patch) | |
tree | d73b1a53d5a156f519051fb6dfba31b174ec0049 | |
parent | 0a18f728691f37a591b710e923f69d6ba303a665 (diff) | |
parent | d79065f1eb1288368c73e22029330e664087b9e6 (diff) |
Merge pull request #614 from nextcloud/feat/workflow-auto-update-phpunit-mysql.yml
Updating phpunit-mysql.yml workflow from template
-rw-r--r-- | .github/workflows/phpunit-mysql.yml | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index db0460e..a59a3f0 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -7,15 +7,25 @@ name: PHPUnit on: pull_request: - push: - branches: - - main - - master - - stable* + paths: + - '.github/workflows/**' + - 'appinfo/**' + - 'lib/**' + - 'templates/**' + - 'tests/**' + - 'vendor/**' + - 'vendor-bin/**' + - '.php-cs-fixer.dist.php' + - 'composer.json' + - 'composer.lock' permissions: contents: read +concurrency: + group: phpunit-mysql-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + env: # Location of the phpunit.xml and phpunit.integration.xml files PHPUNIT_CONFIG: ./tests/phpunit.xml @@ -70,7 +80,15 @@ jobs: extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql coverage: none + - name: Check composer file existence + id: check_composer + uses: andstor/file-existence-action@v1 + with: + files: apps/${{ env.APP_NAME }}/composer.json + - name: Set up PHPUnit + # Only run if phpunit config file exists + if: steps.check_composer.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: composer i @@ -80,7 +98,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=mysql --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 - ./occ app:enable ${{ env.APP_NAME }} + ./occ app:enable --force ${{ env.APP_NAME }} - name: Check PHPUnit config file existence id: check_phpunit |