forked from openmrs/openmrs-core
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.1 KB
/
build-2.x.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
41
42
43
44
45
46
# build with maven for old versions of 2.x
name: Build with Maven
# trigger build on branches that support Java 8
on:
push:
branches:
- 2.0.x
- 2.1.x
- 2.2.x
- 2.3.x
pull_request:
branches:
- 2.0.x
- 2.1.x
- 2.2.x
- 2.3.x
workflow_dispatch:
jobs:
build:
strategy:
matrix:
platform:
# Trusty
- ubuntu-16.04
java-version:
- 8
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Setup JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: ${{ matrix.java-version }}
- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Install dependencies
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml
- name: Build with Maven
run: mvn test --batch-mode --file pom.xml