Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run only if file exists
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed Apr 4, 2022
commit f821c484b5072cb3de27d2e73aa129a8e288b17a
19 changes: 15 additions & 4 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:

env:
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
# PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

jobs:
Expand Down Expand Up @@ -77,15 +76,27 @@ jobs:
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/phpunit-oci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:

env:
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
# PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

jobs:
Expand Down Expand Up @@ -69,15 +68,27 @@ jobs:
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/phpunit-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:

env:
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
# PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

jobs:
Expand Down Expand Up @@ -74,15 +73,27 @@ jobs:
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/phpunit-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ on:

env:
# Location of the phpunit.xml and phpunit.integration.xml files
# Comment to disable
# PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_CONFIG: ./tests/phpunit.xml
PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml

jobs:
Expand Down Expand Up @@ -63,15 +62,27 @@ jobs:
./occ app:enable --force ${{ env.APP_NAME }}
php -S localhost:8080 &

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_CONFIG }}

- name: PHPUnit
# Only run if phpunit config file exists
if: env.PHPUNIT_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }}

- name: Check file existence
id: check_files
uses: andstor/file-existence-action@v1
with:
files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

- name: PHPUnit integration
# Only run if phpunit integration config file exists
if: env.PHPUNIT_INTEGRATION_CONFIG != ''
if: steps.check_files.outputs.files_exists == 'true'
working-directory: apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }}

Expand Down