From 2c4f7e1ec085a5995a8e181b11422e315f9e0832 Mon Sep 17 00:00:00 2001 From: Kevin Wenger Date: Wed, 12 Jul 2023 11:30:58 +0200 Subject: [PATCH] add coverage to coveralls --- .coveralls.yml | 4 ++++ .github/workflows/tests.yml | 10 ++++++++-- CHANGELOG.md | 1 + 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..efa8f82 --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,4 @@ +service_name: github-actions + +# for php-coveralls +coverage_clover: build/logs/clover.xml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bef3e8a..c352edf 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -16,10 +16,16 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} - coverage: none + tools: composer:v2 - uses: actions/checkout@v2 - uses: php-actions/composer@v6 with: php_version: ${{ matrix.php-versions }} version: 2 - - run: ./vendor/bin/phpunit + - run: XDEBUG_MODE=coverage ./vendor/bin/phpunit + - name: Upload coverage results to Coveralls + env: + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + composer global require php-coveralls/php-coveralls + php-coveralls --coverage_clover=build/logs/clover.xml -v diff --git a/CHANGELOG.md b/CHANGELOG.md index ae35575..7023c44 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - add run of tests on Github Actions +- add coverage to coveralls ### Removed - remove Travis integration for tests