hello-world.yml #38
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: hello-world | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- name: Set up Java 1.8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8.0' | |
distribution: 'temurin' | |
- name: Run a build | |
run: ./gradlew compileJava --stacktrace | |
- name: Run tests | |
run: ./gradlew test | |
- name: Build test coverage report | |
run: ./gradlew jacocoTestReport | |
- name: Send test coverage report Codacy | |
uses: codacy/codacy-coverage-reporter-action@v1 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: build/reports/jacoco/test/jacocoTestReport.xml |