Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GHA] Rework github actions #100

Merged
merged 2 commits into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,29 @@

name: mvn verify

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
on: [push, pull_request, workflow_dispatch]

jobs:
build:
strategy:
matrix:
cache: [maven]
java: [17, 21]
os: [ubuntu-latest, windows-latest, macOS-latest]
java: [17]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: zulu
- name: Cache local maven repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ matrix.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ matrix.os }}-m2
distribution: temurin
cache: ${{ matrix.cache }}
- name: Download Maven Wrapper
run: mvn wrapper:wrapper "-Dmaven=3.9.7"
- name: Build with Maven
run: mvn -B -V -e "-Dstyle.color=always" verify -DskipFormat -DverifyFormat
run: ./mvnw -B -V -e "-Dstyle.color=always" verify -DskipFormat -DverifyFormat
env:
MAVEN_OPTS: -Djansi.force=true