-
Notifications
You must be signed in to change notification settings - Fork 24
70 lines (57 loc) · 2.22 KB
/
remoteUnitTests.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
69
70
name: remote unit tests
on:
pull_request:
branches:
- "master"
- "candidate-*"
jobs:
test-against-platform:
runs-on: ubuntu-latest
services:
hpccsystems-platform:
image: hpccsystemslegacy/platform
ports:
- 8510:8510
- 8010:8010
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Rebase
run: |
git config user.email '[email protected]'
git config user.name 'hpccsystems development'
git rebase origin/${{ github.event.pull_request.base.ref }}
git log --pretty=one -n 15
- name: Setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Fetch hpccsystems-platform docker container name
run: |
echo "PLATFORM_CONTAINER_NAME=$(docker ps --format \"{{.Names}}\")" >> $GITHUB_ENV
- name: Get HPCCSystems Platform version
run: |
docker exec ${{ env.PLATFORM_CONTAINER_NAME }} cat /etc/HPCCSystems/version
- name: HPCCSystems Startup
run: |
docker exec ${{ env.PLATFORM_CONTAINER_NAME }} /etc/init.d/hpcc-init start
- name: HPCCSystems Certificate Setup
run: |
docker exec ${{ env.PLATFORM_CONTAINER_NAME }} /opt/HPCCSystems/etc/init.d/distributePKI
- name: HPCCSystems Datafile Setup
run: |
wget -q https://raw.githubusercontent.com/hpcc-systems/hpcc4j/master/wsclient/src/test/resources/generatedata.sh
chmod +x generatedata.sh
docker cp generatedata.sh ${{ env.PLATFORM_CONTAINER_NAME }}:/home/hpcc/generatedata.sh
docker exec ${{ env.PLATFORM_CONTAINER_NAME }} /home/hpcc/generatedata.sh
# speed things up with caching from https://docs.github.com/en/actions/guides/building-and-testing-java-with-maven
- name: Cashe Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build with Maven
run: mvn -B --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false install