-
Notifications
You must be signed in to change notification settings - Fork 402
80 lines (77 loc) · 2.58 KB
/
integration-tests.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
71
72
73
74
75
76
77
78
79
80
# 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: Integration test suite
on:
push:
branches: [ "main", "feat/**" ]
pull_request:
branches: [ "main", "feat/**" ]
jobs:
build-caches:
name: Build with Maven and Docker caches
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
cache-dependency-path: ./pom.xml
- name: Cache Maven dependencies for the ors maven project
run: |
echo "Caching the maven dependencies"
mvn -pl ors-test-scenarios package -Dmaven.test.skip=true -B dependency:go-offline -q
- name: Download image
continue-on-error: true
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
- name: Build the docker image with the one shot builder
run: |
echo "Building the docker image with the one shot builder"
mvn -pl ors-test-scenarios test
env:
ONE_SHOT_IMAGE_BUILDER: true
- name: Upload image
uses: ishworkh/container-image-artifact-upload@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
ors-test-scenarios:
name: Integration test suite
runs-on: ubuntu-latest
needs:
- build-caches
strategy:
matrix:
test_class: [ 'ConfigEnvironmentTest','ConfigFileTest','ConfigLookupTest','GeoToolsTest','GraphRepoTest' ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
cache-dependency-path: ./pom.xml
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
with:
install: true
- name: Download image
uses: ishworkh/container-image-artifact-download@v2.0.0
with:
image: "ors-test-scenarios-war-bare:latest"
- name: Run integration tests
run: |
echo "List all docker images"
docker image ls -a
echo "Running integration tests ${{ matrix.test_class }}"
mvn -pl ors-test-scenarios test -Dtest=${{ matrix.test_class }}