Use codecov action

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
This commit is contained in:
Raimund Schlüßler 2021-05-15 20:01:49 +02:00
parent 60d21d1c3b
commit 1169542a6d
No known key found for this signature in database
GPG Key ID: 036FA7EB1A599178
6 changed files with 29 additions and 9 deletions

View File

@ -27,11 +27,14 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Set up Codecov
run: npm install -g codecov
- name: Test
run: npm run test
env:
CI: true
- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash) -cF javascript -t ${{ secrets.CODECOV_TOKEN }};
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: ./coverage/coverage-final.json
flags: javascript
fail_ci_if_error: true

View File

@ -78,9 +78,16 @@ jobs:
- name: PHPUnit unit & integration
working-directory: apps/${{ env.APP_NAME }}
run: |
./vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover=coverage-unit.xml
./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml --coverage-clover=coverage-integration.xml
bash <(curl -s https://codecov.io/bash) -cF php -t ${{ secrets.CODECOV_TOKEN }};
./vendor/phpunit/phpunit/phpunit -c phpunit.xml
./vendor/phpunit/phpunit/phpunit -c phpunit.integration.xml
- name: Upload coverage to Codecov
if: ${{ matrix.server-versions == 'master' }}
uses: codecov/codecov-action@v1
with:
file: apps/${{ env.APP_NAME }}/clover.unit.xml
flags: php
fail_ci_if_error: true
mysql:
runs-on: ubuntu-latest

2
.gitignore vendored
View File

@ -220,6 +220,8 @@ pip-log.txt
# Unit test / coverage reports
.coverage
.tox
clover.unit.xml
clover.integration.xml
#Translations
*.mo

View File

@ -176,8 +176,8 @@ test-php:
phpunit -c phpunit.integration.xml
test-php-coverage:
phpunit -c phpunit.xml --coverage-clover=coverage-unit.xml
phpunit -c phpunit.integration.xml --coverage-clover=coverage-integration.xml
phpunit -c phpunit.xml
phpunit -c phpunit.integration.xml
lint-php:
php composer.phar run-script cs:check

View File

@ -19,4 +19,8 @@
</exclude>
</whitelist>
</filter>
<logging>
<!-- and this is where your report will be written -->
<log type="coverage-clover" target="./clover.integration.xml"/>
</logging>
</phpunit>

View File

@ -19,4 +19,8 @@
</exclude>
</whitelist>
</filter>
<logging>
<!-- and this is where your report will be written -->
<log type="coverage-clover" target="./clover.unit.xml"/>
</logging>
</phpunit>