Day 02 2025 (#228) #653
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 and Test | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Main AoC code | |
uses: actions/checkout@v3 | |
- name: Checkout the AoC Input files | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.AOC_INPUT }} | |
repository: peckb1/advent-of-code-input | |
path: advent-of-code-input | |
ref: main | |
- name: Bring in the gradle wrapper running the build | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle jacocoTestReport | |
run: ./gradlew --no-daemon build | |
- name: Publish Unit Test Results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
if: always() | |
with: | |
files: build/test-results/**/*.xml | |
- name: Add coverage to PR | |
id: jacoco | |
uses: madrapps/jacoco-report@v1.3 | |
with: | |
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml | |
token: ${{ secrets.GITHUB_TOKEN }} | |
min-coverage-overall: 40 | |
min-coverage-changed-files: 60 |