-
Notifications
You must be signed in to change notification settings - Fork 1.6k
69 lines (64 loc) · 1.86 KB
/
maven.yml
File metadata and controls
69 lines (64 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# This workflow builds and tests PRs for AHC.
# Docs: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Build PR
permissions:
contents: read
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
inputs:
name:
description: 'Github Actions'
required: true
default: 'Github Actions'
jobs:
compile-and-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: 'corretto'
java-version: '11'
- name: Grant Permission
run: chmod +x ./mvnw
- name: Compile and API compatibility check
run: ./mvnw -B -ntp clean verify -DskipTests -Dgpg.skip=true
test:
needs: compile-and-check
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
jdk: [11, 17, 21, 25]
include:
- jdk: 11
distribution: corretto
- jdk: 17
distribution: corretto
- jdk: 21
distribution: corretto
- jdk: 25
distribution: corretto
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.jdk }}
- name: Grant Permission
if: runner.os != 'Windows'
run: chmod +x ./mvnw
- name: Run Tests (Linux)
if: runner.os == 'Linux'
run: ./mvnw -B -ntp clean test -Ddocker.tests=true
- name: Run Tests (macOS)
if: runner.os == 'macOS'
run: ./mvnw -B -ntp clean test -Dno.docker.tests=true
- name: Run Tests (Windows)
if: runner.os == 'Windows'
run: ./mvnw.cmd -B -ntp clean test "-Dno.docker.tests=true"