Skip to content

Maven Build & Test #182

Maven Build & Test

Maven Build & Test #182

Workflow file for this run

name: Maven Build & Test
on:
push:
branches:
- main
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: 'maven'
- name: Set up Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: 3.8.6
- name: Build with Maven
run: mvn --batch-mode -DskipTests -Dmaven.javadoc.skip clean package
- name: Run tests
run: mvn --batch-mode -Dmaven.test.failure.ignore verify
- name: Build tests report
uses: dorny/test-reporter@v1
if: always()
with:
name: Maven Tests
path: '**/target/surefire-reports/*.xml'
reporter: java-junit
fail-on-error: true
- name: Publish SNAPSHOT
if: ${{ success() && github.event_name == 'push' }}
run: mvn --batch-mode -DskipTests -DdeployAtEnd deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}