-
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (39 loc) · 1.37 KB
/
ci.yml
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
name: CI semver.xq
on: [push, pull_request]
jobs:
build:
name: Build and Test Semver.xq (${{ matrix.os }} / JDK ${{ matrix.jdk }} / eXist-db ${{ matrix.exist-version }})
strategy:
fail-fast: true
matrix:
jdk: ['8', '11']
exist-version: ['4.2.0', '5.1.0', '6.1.0-SNAPSHOT']
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-${{ matrix.exist-version }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-${{ matrix.exist-version }}-maven
- name: Maven Build
run: |
if [[ "${{ matrix.exist-version }}" == "4.2.0" ]]; then
mvn -V clean package -DskipTests
else
mvn -V clean package -DskipTests -Pexistdb-5-or-newer -Dexist.version=${{ matrix.exist-version }}
fi
- name: Test
run: |
if [[ "${{ matrix.exist-version }}" == "4.2.0" ]]; then
mvn verify
else
mvn verify -Pexistdb-5-or-newer -Dexist.version=${{ matrix.exist-version }}
fi