forked from plantuml/plantuml-server
-
Notifications
You must be signed in to change notification settings - Fork 0
162 lines (130 loc) · 4.39 KB
/
tests.yml
File metadata and controls
162 lines (130 loc) · 4.39 KB
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
name: Tests
on:
- push
- pull_request
jobs:
test-mvn-livecycle:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
check-latest: true
cache: "maven"
- name: Lifecycle - Step 1/8 - mvn clean
run: mvn --batch-mode clean
- name: Lifecycle - Step 2/8 - mvn validate
run: mvn --batch-mode validate
- name: Lifecycle - Step 3/8 - mvn compile
run: mvn --batch-mode compile
- name: Lifecycle - Step 4/8 - mvn test (with skipTests=true)
run: mvn --batch-mode test
- name: Lifecycle - Step 5/8 - mvn package
run: mvn --batch-mode package
- name: Lifecycle - Step 6/8 - mvn verify
run: mvn --batch-mode verify
- name: Lifecycle - Step 7/8 - mvn install
run: mvn --batch-mode install
- name: Lifecycle - Step 8/8 - mvn site
run: mvn --batch-mode site
test-embedded:
runs-on: ubuntu-latest
needs: test-mvn-livecycle
strategy:
matrix:
java-version: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
check-latest: true
cache: "maven"
- name: Run tests against jetty embedded server
run: mvn --batch-mode clean test -DskipTests=false -Dgroups=\!graphviz-test
test-mvn-jetty-run:
runs-on: ubuntu-latest
needs: test-mvn-livecycle
strategy:
matrix:
java-version: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
check-latest: true
cache: "maven"
- name: Prepare "mvn jetty:run" tests
run: mvn --batch-mode clean test
- name: Start jetty server over maven
run: mvn --batch-mode jetty:run &
- name: Wait 20 seconds (to let maven start the jetty server)
run: sleep 20s
- name: Run tests against "mvn jetty:run" server
run: mvn --batch-mode test -DskipTests=false -Dgroups=\!graphviz-test -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
test-jetty:
runs-on: ubuntu-latest
needs: test-mvn-livecycle
strategy:
matrix:
java-version: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
check-latest: true
cache: "maven"
- name: Prepare external tests
run: mvn --batch-mode clean test
- name: Build the jetty docker stack
run: |
docker image build -f Dockerfile.jetty -t plantuml-server:local .
docker run -d --hostname=test.localhost -p 8080:8080 -e BASE_URL=plantuml plantuml-server:local
- name: Check running containers
run: docker ps
- name: run tests against jetty docker image
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"
test-tomcat:
runs-on: ubuntu-latest
needs: test-mvn-livecycle
strategy:
matrix:
java-version: [ 17, 21, 25 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: ${{ matrix.java-version }}
check-latest: true
cache: "maven"
- name: Prepare external tests
run: mvn --batch-mode clean test
- name: Build the tomcat docker stack
run: |
docker image build -f Dockerfile.tomcat -t plantuml-server:local .
docker run -d --hostname=test.localhost -p 8080:8080 -e BASE_URL=plantuml plantuml-server:local
- name: Check running containers
run: docker ps
- name: run tests against tomcat docker image
run: mvn --batch-mode test -DskipTests=false -DargLine="-Dsystem.test.server=http://localhost:8080/plantuml"