-
Notifications
You must be signed in to change notification settings - Fork 112
40 lines (38 loc) · 1.05 KB
/
unit-tests.yaml
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
name: Unit Test CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- .github/workflows/unit-tests.yaml
- '**.java'
- '**/pom.xml'
jobs:
build:
concurrency:
group: ${{ github.ref }}-${{ github.job }}-${{ matrix.jdk }}-${{ matrix.os }}
cancel-in-progress: true
strategy:
matrix:
jdk: [ 11, 20, 22]
os: [ ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.jdk }}
distribution: temurin
cache: maven
- name: Compile, run tests, and package (JDK 22)
run: mvn -B verify
if: matrix.jdk == '22'
- name: Compile, run tests, and package (JDK 20)
run: mvn -B -Pjdk20 -am -pl jvector-tests test
if: matrix.jdk == '20'
- name: Compile and run tests (JDK 11)
run: mvn -B -Pjdk11 -am -pl jvector-tests test
if: matrix.jdk == '11'