From 2d9933258f2245c110dbb9d26e18a6c400d51478 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elias=20H=C3=A4u=C3=9Fler?= Date: Fri, 22 Mar 2024 08:40:34 +0100 Subject: [PATCH] [TASK] Switch from Codecov to Coveralls --- .gitattributes | 1 - .github/settings.yml | 2 +- .github/workflows/tests.yaml | 39 ++++++++++++++++++++++++++++-------- README.md | 2 +- codecov.yml | 2 -- 5 files changed, 33 insertions(+), 13 deletions(-) delete mode 100644 codecov.yml diff --git a/.gitattributes b/.gitattributes index 0d13786..622a731 100644 --- a/.gitattributes +++ b/.gitattributes @@ -7,7 +7,6 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php-cs-fixer.php export-ignore -/codecov.yml export-ignore /CODEOWNERS export-ignore /composer.lock export-ignore /CONTRIBUTING.md export-ignore diff --git a/.github/settings.yml b/.github/settings.yml index 43abd65..a92da05 100644 --- a/.github/settings.yml +++ b/.github/settings.yml @@ -85,7 +85,7 @@ branches: - 'Tests (PHP 8.2 & highest dependencies)' - 'Tests (PHP 8.2 & lowest dependencies)' - 'Test coverage' - - 'codecov/project' + - 'coverage/coveralls' enforce_admins: false required_linear_history: true restrictions: null diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8e9e5a5..b8eef77 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -66,10 +66,34 @@ jobs: - name: Run tests with coverage run: composer test:coverage - # Report coverage + # Upload artifact - name: Fix coverage path working-directory: .build/coverage run: sed -i 's#/home/runner/work/typo3-codeception-helper/typo3-codeception-helper#${{ github.workspace }}#g' clover.xml + - name: Upload coverage artifact + uses: actions/upload-artifact@v4 + with: + name: coverage + path: .build/coverage/clover.xml + retention-days: 7 + + coverage-report: + name: Report test coverage + runs-on: ubuntu-latest + needs: coverage + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + # Download artifact + - name: Download coverage artifact + id: download + uses: actions/download-artifact@v4 + with: + name: coverage + + # CodeClimate - name: CodeClimate report uses: paambaati/codeclimate-action@v5.0.0 if: env.CC_TEST_REPORTER_ID @@ -77,11 +101,10 @@ jobs: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} with: coverageLocations: | - ${{ github.workspace }}/.build/coverage/clover.xml:clover - - name: codecov report - uses: codecov/codecov-action@v4 + ${{ steps.download.outputs.download-path }}/clover.xml:clover + + # Coveralls + - name: Coveralls report + uses: coverallsapp/github-action@v2 with: - token: ${{ secrets.CODECOV_TOKEN }} - directory: .build/coverage - fail_ci_if_error: true - verbose: true + file: ${{ steps.download.outputs.download-path }}/clover.xml diff --git a/README.md b/README.md index 2249a3b..1f92cd5 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # TYPO3 Codeception Helper -[![Coverage](https://img.shields.io/codecov/c/github/eliashaeussler/typo3-codeception-helper?logo=codecov&token=4BM8pdRAmL)](https://codecov.io/gh/eliashaeussler/typo3-codeception-helper) +[![Coverage](https://img.shields.io/coverallsCoverage/github/eliashaeussler/typo3-codeception-helper?logo=coveralls)](https://coveralls.io/github/eliashaeussler/typo3-codeception-helper) [![Maintainability](https://img.shields.io/codeclimate/maintainability/eliashaeussler/typo3-codeception-helper?logo=codeclimate)](https://codeclimate.com/github/eliashaeussler/typo3-codeception-helper/maintainability) [![CGL](https://img.shields.io/github/actions/workflow/status/eliashaeussler/typo3-codeception-helper/cgl.yaml?label=cgl&logo=github)](https://github.com/eliashaeussler/typo3-codeception-helper/actions/workflows/cgl.yaml) [![Tests](https://img.shields.io/github/actions/workflow/status/eliashaeussler/typo3-codeception-helper/tests.yaml?label=tests&logo=github)](https://github.com/eliashaeussler/typo3-codeception-helper/actions/workflows/tests.yaml) diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index ba6f0b2..0000000 --- a/codecov.yml +++ /dev/null @@ -1,2 +0,0 @@ -comment: - require_changes: true