From 1169542a6d466c03185de8c511c8c81775f2f5d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20Schl=C3=BC=C3=9Fler?= Date: Sat, 15 May 2021 20:01:49 +0200 Subject: [PATCH] Use codecov action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Raimund Schlüßler --- .github/workflows/node-test.yml | 11 +++++++---- .github/workflows/phpunit.yml | 13 ++++++++++--- .gitignore | 2 ++ Makefile | 4 ++-- phpunit.integration.xml | 4 ++++ phpunit.xml | 4 ++++ 6 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/node-test.yml b/.github/workflows/node-test.yml index 7ae7d17f..4fde8ada 100644 --- a/.github/workflows/node-test.yml +++ b/.github/workflows/node-test.yml @@ -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 diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 5fd007a1..4eeca8ad 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -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 diff --git a/.gitignore b/.gitignore index 3b4f2382..cdfd8b02 100644 --- a/.gitignore +++ b/.gitignore @@ -220,6 +220,8 @@ pip-log.txt # Unit test / coverage reports .coverage .tox +clover.unit.xml +clover.integration.xml #Translations *.mo diff --git a/Makefile b/Makefile index f37134d0..6038a4a9 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/phpunit.integration.xml b/phpunit.integration.xml index 91feb33c..6e4757b1 100644 --- a/phpunit.integration.xml +++ b/phpunit.integration.xml @@ -19,4 +19,8 @@ + + + + diff --git a/phpunit.xml b/phpunit.xml index 4a531f33..ef8f310d 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -19,4 +19,8 @@ + + + +