Skip to content
Merged
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
8 changes: 5 additions & 3 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@
name: SonarCloud analysis

on:
- push
- pull_request

push:
branches: [ "main" ] # sonar is only available on main branch for free accounts
pull_request:
branches: [ "main" ] # sonar is only available on main branch for free accounts
workflow_dispatch:

permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ jobs:


- name: archive
run: git config --local user.name actions-user
- run: git config --local user.email "actions@github.com"
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
Expand All @@ -48,6 +48,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
branch: ${{ github.ref }}



Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ Generated badges are not archived by default in your Git repository. You must ar

```
- name: archive
run: git config --local user.name actions-user
- run: git config --local user.email "actions@github.com"
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 out/coverage_line.svg
- run: git add out/coverage_branch.svg
- run: 'git commit -m "chore: add coverage badges" || true'
Expand All @@ -46,6 +46,7 @@ Generated badges are not archived by default in your Git repository. You must ar
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
branch: ${{ github.ref }}
```

You can take inspiration from the [php-coverage-badge-test](https://github.com/athos99/php-coverage-badge-test) file to integrate php-covevrage-badge into your GitAction
Expand Down