Skip to content

Commit

Permalink
separate action for coverage update.
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Jan 15, 2024
1 parent 76bc0a2 commit c03312c
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,10 @@ jobs:
java-version: '17'
cache: 'maven'

# from https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
- name: Build and Test with Maven
timeout-minutes: 15
run: ./mvnw -B test

- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Commit and push the badge (if it changed)
uses: EndBug/add-and-commit@v7
with:
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/update-jacoco-badge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Update Jacoco Coverage Badge

on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master

jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Build and Test with Maven
timeout-minutes: 15
run: ./mvnw -B test

- name: Generate JaCoCo Badge
uses: cicirello/jacoco-badge-generator@v2
with:
generate-branches-badge: true
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Robot Overlord
![workflow](https://github.com/MarginallyClever/Robot-Overlord-App/actions/workflows/main.yml/badge.svg)
![coverage](https://github.com/MarginallyClever/Robot-Overlord-App/actions/workflows/main.yml/jacoco.svg)
[![Javadoc](https://img.shields.io/badge/JavaDoc-Online-green)](https://marginallyclever.github.io/Robot-Overlord-App/)

# Robot Overlord #
![Preview image](Screenshot_2023-12-23_120520.png)

Expand Down

0 comments on commit c03312c

Please sign in to comment.