Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "main"
- "develop"
- "support/*"
- "feature/add_code_coverage"
tags:
- "*"
pull_request:
Expand All @@ -17,6 +18,9 @@ concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

env:
PHPUNIT_ARGS: "--coverage-clover=coverage.xml"

jobs:
generate-ci-matrix:
name: "Generate CI matrix"
Expand All @@ -29,9 +33,19 @@ jobs:
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-ci-matrix.outputs.matrix) }}
uses: "glpi-project/plugin-ci-workflows/.github/workflows/continuous-integration.yml@v1"
uses: "btry/plugin-ci-workflows/.github/workflows/continuous-integration.yml@feature/phpunit_dist_config"
with:
plugin-key: "carbon"
glpi-version: "${{ matrix.glpi-version }}"
php-version: "${{ matrix.php-version }}"
db-image: "${{ matrix.db-image }}"
coverage:
name: "Code coverage"
needs: "ci"
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
5 changes: 5 additions & 0 deletions phpunit.xml → phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<file>hook.php</file>
</include>
</source>
<coverage>
<report>
<xml outputDirectory="docs/coverage" />
</report>
</coverage>
<logging>
<junit outputFile="./tests/logs/junit_install.xml" />
</logging>
Expand Down