-
Notifications
You must be signed in to change notification settings - Fork 15
123 lines (91 loc) · 2.8 KB
/
test.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
name: Test SHOGun
on:
push:
branches:
- main
pull_request:
jobs:
license-headers:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Check License Header
uses: apache/skywalking-eyes@v0.6.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
commitlint:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v6
mvn-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
architecture: x64
- name: Handle caching of maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Test SHOGun with Maven
env:
KEYCLOAK_HOST: localhost
run: mvn -B test
startup:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Set up Java 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
architecture: x64
- name: Cache the Maven packages to speed up build
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven
- name: Run mvn install
run: mvn install --log-file mvn.out.txt
- name: Clone shogun-docker
run: git clone https://github.com/terrestris/shogun-docker
working-directory: ../
- name: Checkout specific commit to ensure reproducibility
run: git checkout f156901098a55639ea8c9496d6c8b38ce1b1c8d7
working-directory: ../shogun-docker
- name: Set environment variables
run: ./setEnvironment.sh create -y
working-directory: ../shogun-docker
- name: Show environment variables
run: cat .env
working-directory: ../shogun-docker
- name: Start containers
run: docker compose up -d shogun-postgis shogun-boot shogun-gs-interceptor
working-directory: ../shogun-docker
- name: Inspect network
run: docker network inspect shogun-docker_default
working-directory: ../shogun-docker
- name: Check if application has started
run: ./scripts/wait.sh
- name: Docker logs
if: always()
run: docker compose logs
working-directory: ../shogun-docker
- name: Maven output
if: always()
run: cat mvn.out.txt