From 25a915f8f05a1288131cb5f131d0f837e62b11c6 Mon Sep 17 00:00:00 2001 From: Kovah Date: Tue, 27 Aug 2024 16:58:56 +0200 Subject: [PATCH] Add Codacy coverage reporting --- .github/workflows/test.yml | 6 ++++++ README.md | 2 +- composer.json | 3 +-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d951e8e4..0f3ce600 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -92,6 +92,12 @@ jobs: - name: Run PHPunit run: composer run test + - name: Report coverage to Codacy + uses: codacy/codacy-coverage-reporter-action@v1.3.0 + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} + coverage-reports: ./test-coverage.xml + - uses: actions/upload-artifact@v4 if: failure() with: diff --git a/README.md b/README.md index 8474ac9b..4625a7fd 100644 --- a/README.md +++ b/README.md @@ -91,7 +91,7 @@ Additionally, you may visit the [community discussions](https://github.com/Kovah ### :construction: Contribution -[![Translations](https://img.shields.io/badge/Translations-Crowdin-2b303d)](https://crowdin.com/project/linkace) ![GitHub branch check runs](https://img.shields.io/github/check-runs/kovah/linkace/2.x?label=Checks) +[![Translations](https://img.shields.io/badge/Translations-Crowdin-2b303d)](https://crowdin.com/project/linkace) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/c32c698ee97b4af2b04d7b7f45f39bae)](https://app.codacy.com/gh/Kovah/LinkAce/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) ![GitHub branch check runs](https://img.shields.io/github/check-runs/kovah/linkace/2.x?label=Checks) Please consult the [**contribution guidelines**](CONTRIBUTING.md) to start working on LinkAce. diff --git a/composer.json b/composer.json index 59233779..64ba8fcd 100644 --- a/composer.json +++ b/composer.json @@ -84,8 +84,7 @@ "@php artisan package:discover --ansi" ], "lint": "./vendor/bin/phpcs --runtime-set ignore_warnings_on_exit 1", - "test": "./vendor/bin/phpunit", - "code-coverage": "./vendor/bin/phpunit --coverage-clover test-coverage.xml" + "test": "./vendor/bin/phpunit --coverage-clover test-coverage.xml" }, "config": { "optimize-autoloader": true,