Add Advent of Code 2025 Day 4: Paper Rolls #3220
This file contains hidden or 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
| # Runs Java tests on push/PR for changed files | |
| # Tests on Ubuntu and Windows with Java 21 | |
| # Auto-merges dependabot PRs if tests pass | |
| name: Run tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '**.java' | |
| - 'build.gradle' | |
| - 'gradle/wrapper/**' | |
| - '.github/workflows/test.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - '**.java' | |
| - 'build.gradle' | |
| - 'gradle/wrapper/**' | |
| # schedule: | |
| # - cron: "0 */3 * * *" | |
| # Cancel existing executions when new commits are pushed onto the branch | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }}-latest | |
| timeout-minutes: 10 | |
| strategy: | |
| matrix: | |
| java: [21] | |
| os: [ubuntu, windows] | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v6 | |
| - name: Set up latest JDK N from oracle.com | |
| uses: oracle-actions/setup-java@v1 | |
| with: | |
| website: oracle.com | |
| release: ${{ matrix.java }} | |
| - name: Run Gradle's test task | |
| run: ./gradlew -i --no-daemon --parallel --continue --build-cache --stacktrace test | |
| env: | |
| GH_USERNAME: 'GitHub Action' | |
| GH_TOKEN: ${{ secrets.GH_TOKEN }} | |
| - name: Publish Test Report | |
| uses: mikepenz/action-junit-report@v6 | |
| if: success() || failure() | |
| with: | |
| report_paths: '**/build/test-results/test/TEST-*.xml' | |
| retention-days: 1 | |
| auto-merge: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repo | |
| uses: actions/checkout@v6 | |
| - name: auto-merge | |
| if: | | |
| github.actor == 'dependabot[bot]' && | |
| github.event_name == 'pull_request' | |
| run: | | |
| gh pr merge --auto --rebase "$PR_URL" | |
| env: | |
| PR_URL: ${{github.event.pull_request.html_url}} | |
| # this secret needs to be in the settings.secrets.dependabot | |
| GITHUB_TOKEN: ${{secrets.GH_ACTION_TOKEN}} |