From b0c57d7acf82f36314f313c5667cfa47aa1314cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Thu, 5 Dec 2024 02:31:56 +0100 Subject: [PATCH] Add Codecov integration --- .gitattributes | 1 + .github/workflows/test-unit.yml | 2 +- codecov.yml | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 codecov.yml diff --git a/.gitattributes b/.gitattributes index a9dd388a..8f82de87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,5 +3,6 @@ /.gitattributes export-ignore /.gitignore export-ignore /.php-cs-fixer.dist.php export-ignore +/codecov.yml export-ignore /phpstan.neon.dist export-ignore /phpunit.xml.dist export-ignore diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index f1919d09..bb6a5ade 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -154,7 +154,7 @@ jobs: php -d opcache.enable_cli=1 vendor/bin/phpunit --exclude-group none $(if [ -n "$LOG_COVERAGE" ]; then echo --coverage-text; else echo --no-coverage; fi) --fail-on-warning --fail-on-risky $(if vendor/bin/phpunit --version | grep -q '^PHPUnit 9\.'; then echo -v; else echo --fail-on-notice --fail-on-deprecation --display-notices --display-deprecations --display-phpunit-deprecations --display-warnings --display-errors --display-incomplete --display-skipped; fi) - name: Upload coverage (only for coverage) - if: env.LOG_COVERAGE && false # TODO + if: env.LOG_COVERAGE uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..8611d756 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,9 @@ +comment: false +coverage: + status: + project: + default: + target: auto + threshold: 0.025 + patch: false + changes: false