-
Notifications
You must be signed in to change notification settings - Fork 28
68 lines (59 loc) · 1.74 KB
/
commit.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
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
# Build and test zentity for each supported version of Elasticsearch whenever pushing a commit or submitting a pull request.
name: Commit
on:
push:
branches:
- '**'
tags-ignore:
- "zentity-*.*.*"
- "zentity-*.*.*-*"
pull_request:
branches:
- '**'
tags-ignore:
- "zentity-*.*.*"
- "zentity-*.*.*-*"
jobs:
build:
strategy:
# Attempt to run all tests.
fail-fast: false
# Build and test zentity for each version of Elasticsearch that its APIs support.
matrix:
elasticsearch:
- 8.14.3
- 8.14.2
- 8.14.1
- 8.14.0
- 8.13.4
- 8.13.3
- 8.13.2
- 8.13.1
- 8.13.0
# Use the latest LTS OS.
runs-on: ubuntu-20.04
steps:
# Checkout the repository.
# Uses: https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v2
# Configure the JDK.
# Uses: https://github.com/actions/setup-java
# Elasticsearch JVM support matrix: https://www.elastic.co/support/matrix#matrix_jvm
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
# Cache Maven packages.
# Uses: https://github.com/actions/cache
- name: Cache packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
# Build and test zentity for a given version of Elasticsearch.
- name: Build and test
env:
ELASTICSEARCH_VERSION: ${{ matrix.elasticsearch }}
run: mvn --batch-mode clean install "-Delasticsearch.version=$ELASTICSEARCH_VERSION" --file pom.xml