by default don't do codecoverage
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
This commit is contained in:
parent
33fe41e86a
commit
eeb3c15b05
|
@ -13,9 +13,18 @@ jobs:
|
|||
nextcloud: ['stable24']
|
||||
database: ['sqlite']
|
||||
experimental: [false]
|
||||
codecoverage: [false]
|
||||
include:
|
||||
- php-versions: 8.0
|
||||
nextcloud: stable24
|
||||
database: sqlite
|
||||
experimental: false
|
||||
codecoverage: true
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 2 # https://github.com/codecov/codecov-action/issues/190#issuecomment-790729633
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
|
@ -50,6 +59,9 @@ jobs:
|
|||
- name: Unittests
|
||||
working-directory: ../server/apps/news
|
||||
run: make unit-test
|
||||
env:
|
||||
CODECOVERAGE: ${{ matrix.codecoverage }}
|
||||
- name: Upload codecoverage
|
||||
if: ${{ matrix.codecoverage }}
|
||||
working-directory: ../server/apps/news
|
||||
run: bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover -N ${{ github.sha }}
|
||||
|
|
7
Makefile
7
Makefile
|
@ -200,7 +200,12 @@ php-test-dependencies:
|
|||
|
||||
.PHONY: unit-test
|
||||
unit-test:
|
||||
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover
|
||||
@if [ "$(CODECOVERAGE)" = "true" ]; then \
|
||||
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover build/php-unit.clover; \
|
||||
else \
|
||||
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --no-coverage; \
|
||||
fi
|
||||
|
||||
|
||||
# Command for running JS and PHP tests. Works for package.json files in the js/
|
||||
# and root directory. If phpunit is not installed systemwide, a copy is fetched
|
||||
|
|
Loading…
Reference in New Issue