Skip to content

Commit

Permalink
move phpunit
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <[email protected]>
  • Loading branch information
dartcafe committed Sep 12, 2022
1 parent 3537878 commit a2cd0c8
Show file tree
Hide file tree
Showing 4 changed files with 157 additions and 1,811 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit
server-path: ${{ env.SERVER_PATH }}
db-engine: sqlite
db-port: ${{ env.DB_PORT}}
Expand All @@ -47,11 +48,11 @@ jobs:

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
run: phpunit -c tests/phpunit.xml

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.integration.xml
run: phpunit -c tests/phpunit.integration.xml

mysql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -81,6 +82,7 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit
server-path: ${{ env.SERVER_PATH }}
db-engine: 'mysql'
db-port: ${{ env.DB_PORT }}
Expand All @@ -90,11 +92,11 @@ jobs:

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
run: phpunit -c tests/phpunit.xml

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.integration.xml
run: phpunit -c tests/phpunit.integration.xml

pgsql:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -127,6 +129,7 @@ jobs:
with:
server-version: ${{ matrix.server-versions }}
php-version: ${{ matrix.php-versions }}
php-tools: phpunit
server-path: ${{ env.SERVER_PATH }}
db-engine: 'pgsql'
db-port: ${{ env.DB_PORT}}
Expand All @@ -136,8 +139,8 @@ jobs:

- name: PHPUnit
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.xml
run: phpunit -c tests/phpunit.xml

- name: PHPUnit integration
working-directory: ${{ env.SERVER_PATH }}/apps/${{ env.APP_NAME }}
run: ./vendor/phpunit/phpunit/phpunit -c tests/phpunit.integration.xml
run: phpunit -c tests/phpunit.integration.xml
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,10 @@ ifeq (,$(composer))
php $(build_tools_dir)/composer.phar update --prefer-dist
endif

#install additional dev tools
tools: composer
composer global require phpunit/phpunit vimeo/psalm friendsofphp/php-cs-fixer

# Builds the source package for the appstore
# signs, if certificate is present
package: clean
Expand Down Expand Up @@ -116,5 +120,5 @@ package: clean

.PHONY: test
test: composer setup-dev-composer
$(CURDIR)/vendor/phpunit/phpunit/phpunit --coverage-clover clover.xml -c tests/phpunit.xml
$(CURDIR)/vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
phpunit --coverage-clover clover.xml -c tests/phpunit.xml
phpunit -c phpunit.integration.xml
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"require-dev": {
"christophwurst/nextcloud": "^24.0",
"phpunit/phpunit": "^9.5",
"league/factory-muffin": "^3.0",
"league/factory-muffin-faker": "^2.0",
"nextcloud/coding-standard": "^1.0",
Expand Down
Loading

0 comments on commit a2cd0c8

Please sign in to comment.