Java CI with Maven #1329
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Java CI with Maven | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'RELEASE-*' | |
pull_request: | |
branches: | |
- 'main' | |
- 'RELEASE-*' | |
permissions: | |
contents: read | |
jobs: | |
build: | |
# TODO update once 25-ea is available | |
strategy: | |
matrix: | |
java-version: [ '17', '21' ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up JDK ${{ matrix.java-version }} | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
java-version: ${{ matrix.java-version }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Build project | |
run: mvn -B package --file pom.xml | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # v4.5.0 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
cache: maven | |
- name: Analyze starters | |
run: mvn dependency:analyze --file tck-dist/src/main/pom.xml |