forked from OpenLiberty/ci.maven
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (56 loc) · 1.86 KB
/
maven.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
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
name: Java CI with Maven
on:
push:
branches: '**'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ${{ matrix.os }}
# Steps represent a sequence of tasks that will be executed as part of the job
strategy:
fail-fast: false
matrix:
# test against latest update of each major Java version, as well as specific updates of LTS versions:
os: [ubuntu-18.04, windows-latest]
RUNTIME: [ol, wlp]
RUNTIME_VERSION: [21.0.0.3, 20.0.0.12]
java: [11, 8]
exclude:
- java: 8
RUNTIME_VERSION: 20.0.0.12
name: ${{ matrix.RUNTIME }} ${{ matrix.RUNTIME_VERSION }}, Java ${{ matrix.java }}, ${{ matrix.os }}
steps:
- name: Setup Java ${{ matrix.java }}
uses: joschi/setup-jdk@v2
with:
java-version: ${{ matrix.java }}
- name: Checkout ci.maven
uses: actions/checkout@v2
- name: Checkout ci.common
uses: actions/checkout@v2
with:
repository: OpenLiberty/ci.common
path: ci.common
- name: Checkout ci.ant
uses: actions/checkout@v2
with:
repository: OpenLiberty/ci.ant
path: ci.ant
- name: Cache maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Install ci.ant and ci.common
run: |
cd ./ci.ant
mvn clean install
cd ../ci.common
mvn clean install
cd ..
- name: Run tests with maven
run: mvn verify -Ponline-its -D"invoker.streamLogs"=true -Druntime=${{ matrix.RUNTIME }} -DruntimeVersion="${{ matrix.RUNTIME_VERSION }}"