Skip to content

Updating Github actions to simplify JDK setup #251

Updating Github actions to simplify JDK setup

Updating Github actions to simplify JDK setup #251

Workflow file for this run

name: Java CI
on:
push:
branches: [ master ]
paths-ignore:
- '.github/workflows/doc.yml'
- '.github/workflows/license_update.yml'
- '.github/workflows/version_update.yml'
- 'ci/doc/**'
- 'create.sh'
- 'LICENSE'
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout submodules
uses: actions/checkout@v4
with:
fetch-depth: 0
path: advent-of-code-inputs
repository: zodac/advent-of-code-inputs
token: ${{ secrets.SUBMODULE_ACCESS }}
- name: Cache local .m2
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Setup Maven Action
uses: s4u/[email protected]
with:
checkout-fetch-depth: 0
java-distribution: 'temurin'
java-version: '23'
maven-version: '3.9.9'
- name: Run lints and test with Maven (including SonarQube)
env:
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
SONARQUBE_PAT: ${{ secrets.SONARQUBE_PAT }}
run: mvn clean install -Dall -Dsonarqube -T 2C