-
Notifications
You must be signed in to change notification settings - Fork 156
40 lines (38 loc) · 1.45 KB
/
build.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
name: Build Maven
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
name: Maven build
runs-on: ${{ matrix.os }}
strategy:
matrix:
java: [ '8']
os: [ 'ubuntu-latest', 'macos-10.15', 'windows-latest' ]
steps:
- uses: actions/checkout@v2
- name: Java ${{ matrix.Java }} (${{ matrix.os }})
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.java }}
distribution: 'adopt'
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-repository-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-repository
- name: Set Integration Test Environment
if: matrix.os == 'ubuntu-latest'
run: >
echo '::set-output name=MAVEN_PROFILE_FLAG::-P integration-test'
&& echo '::set-output name=MAVEN_VERIFY_STAGE::verify'
&& echo "127.0.0.1 openam.local" | sudo tee -a /etc/hosts
id: maven-profile-flag
- name: Build with Maven
env:
MAVEN_OPTS: -Dhttps.protocols=TLSv1.2 -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 -Dmaven.wagon.http.retryHandler.requestSentEnabled=true -Dmaven.wagon.http.retryHandler.count=10
run: mvn --batch-mode --update-snapshots package ${{ steps.maven-profile-flag.outputs.MAVEN_VERIFY_STAGE }} --file pom.xml ${{ steps.maven-profile-flag.outputs.MAVEN_PROFILE_FLAG }}