Skip to content

Merge pull request #2 from athos99/dev #116

Merge pull request #2 from athos99/dev

Merge pull request #2 from athos99/dev #116

Workflow file for this run

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 actions-user
- run: git config --local user.email "actions@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