Merge pull request #4 from athos99/dev #128
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: push | |
| jobs: | |
| test: | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | |
| fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository. | |
| - name: clover report | |
| uses: athos99/php-coverage-badge@main | |
| with: | |
| report: 'test/clover.xml' | |
| report_type: 'clover' | |
| coverage_line_badge_path: 'test/clover_coverage_line.svg' | |
| coverage_branch_badge_path: 'test/clover_coverage_branch.svg' | |
| - name: cobertura report | |
| uses: athos99/php-coverage-badge@main | |
| with: | |
| report: 'test/cobertura.xml' | |
| report_type: 'cobertura' | |
| coverage_line_badge_name: 'corbertura line coverage' | |
| coverage_branch_badge_name: 'corbertura branch coverage' | |
| coverage_line_badge_path: 'test/cobertura_coverage_line.svg' | |
| coverage_branch_badge_path: 'test/cobertura_coverage_branch.svg' | |
| coverage_line_percent_ok: '99' | |
| coverage_branch_percent_ok: '95' | |
| - name: archive | |
| run: git config --local user.name "github-actions[bot]" | |
| - run: git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - run: git add test/clover_coverage_line.svg | |
| - run: git add test/clover_coverage_branch.svg | |
| - run: git add test/cobertura_coverage_line.svg | |
| - run: git add test/cobertura_coverage_branch.svg | |
| - run: 'git commit -m "chore: add coverage badges" || true' | |
| - name: Push changes # push the output folder to your repo | |
| uses: ad-m/github-push-action@master | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| force: true | |
| branch: ${{ github.ref }} | |