115 refactor main #467
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: Java CI with Maven | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Java Version | |
run: | | |
Java_Version=$(mvn help:evaluate "-Dexpression=maven.compiler.release" -q -DforceStdout | sed -e 's/^1\./1.0./') | |
echo "Java_Version=$Java_Version" >> $GITHUB_ENV | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ env.Java_Version }} | |
distribution: 'temurin' | |
cache: maven | |
- name: Compile with Maven | |
run: mvn -B compile --file pom.xml | |
- name: Test with Maven | |
run: mvn -B test --file pom.xml |