-
Notifications
You must be signed in to change notification settings - Fork 260
186 lines (175 loc) · 5.58 KB
/
backend.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
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the 'License'); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: Backend
on:
push:
pull_request:
paths-ignore:
- '**/*.md'
concurrency:
group: backend-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
license-header:
if: github.repository == 'apache/seatunnel-web'
name: License header
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Check license header
uses: apache/skywalking-eyes@985866ce7e324454f61e22eb2db2e998db09d6f3
code-style:
if: github.repository == 'apache/seatunnel-web'
name: Code style
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'temurin'
cache: 'maven'
- name: Check code style
run: ./mvnw --batch-mode --quiet --no-snapshot-updates clean spotless:check
dead-link:
if: github.repository == 'apache/seatunnel-web'
name: Dead links
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v2
- run: sudo npm install -g [email protected]
- run: |
for file in $(find . -name "*.md"); do
markdown-link-check -c .dlc.json -q "$file"
done
sanity-check:
if: github.repository == 'apache/seatunnel-web'
name: Sanity check results
needs: [ license-header, code-style, dead-link ]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check results
run: |
[[ ${{ needs.license-header.result }} == 'success' ]] || exit 1;
[[ ${{ needs.code-style.result }} == 'success' ]] || exit 1;
[[ ${{ needs.dead-link.result }} == 'success' ]] || exit 1;
build:
if: github.repository == 'apache/seatunnel-web'
name: Build
needs: [ sanity-check ]
strategy:
matrix:
java: [ '8', '11' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
runs-on: ${{ matrix.os }}
timeout-minutes: 80
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: 'maven'
- name: Build distribution tar
run: >-
./mvnw -B install
-D"maven.test.skip"=true
-D"checkstyle.skip"=true
-D"license.skipAddThirdParty"=true
-D"http.keepAlive"=false
-D"maven.wagon.http.pool"=false
-D"maven.wagon.http.retryHandler.count"=3
-D"maven.wagon.httpconnectionManager.ttlSeconds"=120
dependency-license:
if: github.repository == 'apache/seatunnel-web'
name: Dependency licenses
needs: [ sanity-check ]
runs-on: ubuntu-latest
timeout-minutes: 40
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: 'maven'
- name: Install
run: >-
./mvnw -B -q install -DskipTests -P release
-D"maven.test.skip"=true
-D"maven.javadoc.skip"=true
-D"checkstyle.skip"=true
-D"license.skipAddThirdParty"
- name: Check Dependencies Licenses
run: tools/dependencies/checkLicense.sh
unit-test:
name: Unit Test
runs-on: ${{ matrix.os }}
needs: [ sanity-check ]
strategy:
matrix:
java: [ '8', '11' ]
os: [ 'ubuntu-latest', 'windows-latest' ]
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Run Unit tests
run: |
./mvnw -B -T 1C clean verify -D"maven.test.skip"=false -D"checkstyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates
env:
MAVEN_OPTS: -Xmx2048m
integration-test:
name: Integration Test
runs-on: ${{ matrix.os }}
needs: [ sanity-check ]
strategy:
matrix:
java: [ '8', '11' ]
os: [ 'ubuntu-latest' ]
timeout-minutes: 90
steps:
- uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: Run Integration tests
run: |
./mvnw -T 1C -B verify -DskipUT=true -D"checkstyle.skip"=true -D"license.skipAddThirdParty"=true --no-snapshot-updates
env:
MAVEN_OPTS: -Xmx2048m