Build project with Maven #2273
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 is triggered by pushing commits on branches and/or Pull Requests. | |
# It will not trigger for pushes to master but run every night to provide a nightly build status. | |
name: Build project with Maven | |
on: | |
pull_request: | |
push: | |
branches-ignore: [ master ] | |
schedule: | |
- cron: '2 2 * * 1-5' # run nightly builds everyday | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Java setup | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 17 | |
cache: maven | |
- name: Run build | |
run: mvn -B -ntp clean install com.mycila:license-maven-plugin:check | |
- name: Run I-Tests and generate coverage reports | |
run: mvn -B -ntp -Pitest verify failsafe:verify | |
- name: Upload coverage to Codecov | |
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.actor != 'dependabot[bot]' | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{secrets.CODECOV_TOKEN}} |