Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/external.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <213943+nickvergessen@users.noreply.github.com>2022-10-17 23:43:39 +0300
committerGitHub <noreply@github.com>2022-10-17 23:43:39 +0300
commit63517a7edb0ec58b37f2491289425bdf6ebba626 (patch)
tree19258908d7afb1aa453542aea22a8f486753ea3b
parent3998b490ea0412e7e79dcb5402a67cad7dc32e0d (diff)
parent35769d7fc16f8523304119d7c707f60a164e4777 (diff)
Merge pull request #337 from nextcloud/feat/workflow-auto-update-phpunit-mysql.yml
Updating phpunit-mysql.yml workflow from template
-rw-r--r--.github/workflows/phpunit-mysql.yml26
1 files changed, 25 insertions, 1 deletions
diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml
index af1c6f6..151a507 100644
--- a/.github/workflows/phpunit-mysql.yml
+++ b/.github/workflows/phpunit-mysql.yml
@@ -7,6 +7,18 @@ name: PHPUnit
on:
pull_request:
+ paths:
+ - '.github/workflows/**'
+ - 'appinfo/**'
+ - 'lib/**'
+ - 'templates/**'
+ - 'tests/**'
+ - 'vendor/**'
+ - 'vendor-bin/**'
+ - '.php-cs-fixer.dist.php'
+ - 'composer.json'
+ - 'composer.lock'
+
push:
branches:
- main
@@ -16,6 +28,10 @@ on:
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 +86,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 +104,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