-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ jobs: | |
- name: Mutation Coverage | ||
run: mvn -V --color always -ntp org.pitest:pitest-maven:mutationCoverage | ||
- name: Autograding | ||
uses: uhafner/autograding-github-action@v2.0.0 | ||
uses: uhafner/autograding-github-action@v2.1.0 | ||
with: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
HEAD_SHA: ${{github.event.pull_request.head.sha}} | ||
|
@@ -57,6 +57,7 @@ jobs: | |
"analysis": [ | ||
{ | ||
"name": "Style", | ||
"id": "style", | ||
"tools": [ | ||
{ | ||
"id": "checkstyle", | ||
|
@@ -77,6 +78,7 @@ jobs: | |
}, | ||
{ | ||
"name": "Bugs", | ||
"id": "bugs", | ||
"tools": [ | ||
{ | ||
"id": "spotbugs", | ||
|
@@ -126,3 +128,56 @@ jobs: | |
} | ||
] | ||
} | ||
- name: Write metrics to GitHub output | ||
id: metrics | ||
run: | | ||
cat metrics.env >> "${GITHUB_OUTPUT}" | ||
mkdir -p badges | ||
- name: Generate the badge SVG image for the line coverage | ||
uses: emibcn/[email protected] | ||
with: | ||
label: 'Line coverage' | ||
status: ${{ steps.metrics.outputs.line }}% | ||
color: 'green' | ||
path: badges/line-coverage.svg | ||
- name: Generate the badge SVG image for the branch coverage | ||
uses: emibcn/[email protected] | ||
with: | ||
label: 'Branch coverage' | ||
status: ${{ steps.metrics.outputs.branch }}% | ||
color: 'green' | ||
path: badges/branch-coverage.svg | ||
- name: Generate the badge SVG image for the mutation coverage | ||
uses: emibcn/[email protected] | ||
with: | ||
label: 'Mutation coverage' | ||
status: ${{ steps.metrics.outputs.mutation }}% | ||
color: 'green' | ||
path: badges/mutation-coverage.svg | ||
- name: Generate the badge SVG image for the style warnings | ||
uses: emibcn/[email protected] | ||
with: | ||
label: 'Style warnings' | ||
status: ${{ steps.metrics.outputs.style }} | ||
color: 'orange' | ||
path: badges/style-warnings.svg | ||
- name: Generate the badge SVG image for the potential bugs | ||
uses: emibcn/[email protected] | ||
with: | ||
label: 'Potential Bugs' | ||
status: ${{ steps.metrics.outputs.bugs }} | ||
color: 'red' | ||
path: badges/bugs.svg | ||
- name: Commit badge | ||
continue-on-error: true | ||
run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "GitHub Action" | ||
git add badges/*.svg | ||
git commit -m "Update badges with results from latest autograding" | ||
- name: Push badge commit | ||
uses: ad-m/github-push-action@master | ||
if: ${{ success() }} | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
branch: main |