Java CI with Maven #222
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 | |
# 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: | |
- release | |
schedule: | |
- cron: "0 20 * * 6" # Runs at 05:00 Asia/Seoul on Sun. | |
jobs: | |
build: | |
name: Builds with java ${{ matrix.java }} on ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
max-parallel: 3 # Maximum: Sum of matrices. | |
matrix: | |
java: [8, 11, 17] # LTS versions (always latest). | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout sources from repository | |
uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: zulu | |
cache: maven | |
- name: Build with Maven | |
run: | | |
mvn --version | |
mvn clean package -B --file pom.xml | |
- name: Send code coverage to Codecov | |
uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: false | |
verbose: true |