Skip to content

Merge pull request #80 from BjoernKW/dependabot/github_actions/action… #60

Merge pull request #80 from BjoernKW/dependabot/github_actions/action…

Merge pull request #80 from BjoernKW/dependabot/github_actions/action… #60

name: Build and test
on:
push:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'adopt'
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Build with Maven
run: mvn --batch-mode -DskipTests package
- name: Run tests
run: mvn --batch-mode -Dmaven.test.failure.ignore=true test
- name: Upload test results
uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
path: target/surefire-reports/*.xml