ci: fix badge not generate #17
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 | |
on: | |
push: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Unit Test with Gradle | |
run: ./gradlew :generator:test --info | |
- name: Integration Test with gradle | |
run: ./gradlew :integration-test:test --info | |
continue-on-error: true | |
- name: Export Integration Test Summary | |
run: cat integration-test/build/test-results/report.md >> $GITHUB_STEP_SUMMARY | |
- name: Merge Jacoco | |
run: ./gradlew jacocoTestReport | |
- name: Generate JaCoCo Badge | |
uses: cicirello/jacoco-badge-generator@v2 | |
with: | |
jacoco-csv-file: build/reports/jacoco/test/jacocoTestReport.csv | |
badges-directory: .github/badges | |
generate-coverage-badge: false | |
generate-branches-badge: false | |
generate-coverage-endpoint: true | |
coverage-endpoint-filename: jacoco.json | |
generate-summary: true | |
summary-filename: coverage-summary.json | |
- name: Upload | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
file_pattern: ".github/badges/**" | |
commit_message: "ci: update badge" |