Merge pull request #16 from paulorb/ISSUE-15 #79
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: Kotlin Gradle Build | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '17' | |
- name: Build with Gradle | |
run: | | |
./gradlew shadowJar | |
- name: Code Coverage Sonar | |
run: | | |
./gradlew test jacocoTestReport | |
- name: Generate JaCoCo Badge | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
generate-branches-badge: true | |
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv | |
- name: Commit and push the badge (if it changed) | |
uses: EndBug/add-and-commit@v7 | |
with: | |
default_author: github_actions | |
message: 'commit badge' | |
add: '*.svg' | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-artifacts | |
path: build/libs/*.jar |