Merge remote-tracking branch 'origin/master' #48
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
name: build master branch | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- "src/**/*.java" | |
- "*.gradle" | |
- "gradle-*" | |
pull_request: | |
branches: [ master ] | |
paths: | |
- "src/**/*.java" | |
- "*.gradle" | |
- "gradle-*" | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [windows-2022, ubuntu-20.04, macos-11] | |
jdk: ['8', '17'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.jdk }} | |
distribution: 'temurin' | |
cache: gradle | |
- name: Build with Gradle | |
uses: gradle/gradle-build-action@937999e9cc2425eddc7fd62d1053baf041147db7 | |
with: | |
arguments: build -x test --no-daemon | |
codecov: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run Test Coverage | |
run: ./gradlew jacocoTestReport | |
- name: Generate JaCoCo Badge | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
jacoco-csv-file: build/reports/jacoco/jacoco.csv | |
- name: Commit the badge (if it changed) | |
run: | | |
if [[ `git status --porcelain` ]]; then | |
git config --global user.name 'Clement Jean' | |
git config --global user.email '[email protected]' | |
git add .github/badges/jacoco.svg | |
git commit -m "Autogenerated JaCoCo coverage badge" | |
git push | |
fi |