diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4cc3fc2..f639cee 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -68,57 +68,39 @@ jobs: configuration: "phpunit.xml.dist" - name: upload coverage file - if: "github.event_name == 'pull_request'" + if: "${{github.event_name}} == 'pull_request'" uses: actions/upload-artifact@v3 with: - name: coverage - path: Build + name: coverage + path: Build - name: upload composer.lock on fail if: ${{ failure() }} uses: actions/upload-artifact@v3 with: - name: "composer.${{ matrix.env.php }}.${{ matrix.env.symfony }}" - path: | - composer.json - composer.lock + name: "composer.${{ matrix.env.php }}.${{ matrix.env.symfony }}" + path: | + composer.json + composer.lock coverage_report: needs: test runs-on: ubuntu-latest - if: "github.event_name == 'pull_request'" + if: "${{ github.event_name }} == 'pull_request'" steps: + - uses: actions/checkout@v3 + - uses: actions/download-artifact@v3 with: name: coverage - path: Build - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: 8.2 - - - name: 'install phpcov' - run: composer -n require --dev php-coveralls/php-coveralls - - - name: 'merge coverage files' - run: vendor/bin/phpcov merge --cobertura cobertura.xml ./Build - - - name: "Code Coverage Report" - uses: irongut/CodeCoverageSummary@v1.3.0 - with: - filename: cobertura.xml - badge: true - fail_below_min: true - format: markdown - hide_branch_rate: false - hide_complexity: true - indicators: true - output: both - thresholds: '60 80' + path: coverage - - name: Add Coverage PR Comment - uses: marocchino/sticky-pull-request-comment@v2 + - name: Merge coverage reports + id: coverage + uses: selfagency/merge-coverage@v1.1.2 with: - recreate: true - path: code-coverage-results.md + source: ${{ github.workspace }}/${{ inputs.package }} + coverage-reports: ${{ github.workspace }}/${{ inputs.package }}/coverage + output-folder: ${{ github.workspace }}/${{ inputs.package }}/coverage-reports + formats: clover + artifacts: true