From d944cb672283be9bdcc09b782c1a2c9325e8e997 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 16 Dec 2021 16:12:18 +0100 Subject: [PATCH 1/3] Remove broken .coveralls.yml The only option that was specified is `src_dir:` which apparently was removed several years ago. --- .coveralls.yml | 1 - 1 file changed, 1 deletion(-) delete mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 6b74c21..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -src_dir: lib From 53cd07fcb0e9730c1ac825c581645c2fd7ecc75b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 16 Dec 2021 16:07:54 +0100 Subject: [PATCH 2/3] Remove php-coveralls/php-coveralls from composer.json This is only relevant for CI (which is currently broken anyway). It will be installed as part of the CI job in a follow-up commit. --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index a44bf76..842c77f 100644 --- a/composer.json +++ b/composer.json @@ -22,8 +22,7 @@ "php": "~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0" }, "require-dev": { - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", - "php-coveralls/php-coveralls": "~2.0" + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" }, "suggest": { "ext-gmp": "GMP is the preferred extension for big integer calculations", From 74ffbd50e5da7499fa58de596a9024b6cf581621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Thu, 16 Dec 2021 16:09:06 +0100 Subject: [PATCH 3/3] Add Coveralls to GitHub Actions workflow Based on: https://github.com/php-coveralls/php-coveralls#github-actions --- .github/workflows/phpunit.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 556e105..094f89e 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -23,7 +23,6 @@ jobs: - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - coverage: none extensions: gmp, bcmath tools: composer - uses: actions/checkout@v2 @@ -32,4 +31,10 @@ jobs: echo "::add-matcher::${{ runner.tool_cache }}/php.json" echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - run: composer install - - run: vendor/bin/phpunit + - run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml + - 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