chore: add plugin to build executable JAR (#427) #983
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: Test-Suite | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
permissions: # added using https://github.com/step-security/secure-workflows | |
contents: read | |
pull-requests: write | |
jobs: | |
test-suite: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@d0651293c4a5a52e711f25b41b05b2212f385d28 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B package -Pcoverage --file pom.xml | |
- name: Generate JaCoCo badge | |
id: jacoco | |
uses: cicirello/jacoco-badge-generator@f33476a5a3fd5a4f77cb5eef2ebe728c1dd5b921 | |
with: | |
badges-directory: badges | |
generate-summary: true | |
generate-coverage-endpoint: true | |
- name: Log coverage percentages to workflow output | |
run: | | |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}" | |
- name: Upload JaCoCo coverage report as a workflow artifact | |
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 | |
with: | |
name: jacoco-report | |
path: target/site/jacoco/ | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@f30e4959ba63075080d4f7f90cacc18d9f3fafd7 # v4.0.0 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: target/site/jacoco/jacoco.xml |