This repository has been archived by the owner on Jun 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 548
186 lines (169 loc) · 4.82 KB
/
continuous-integration.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
name: CI
on:
push:
branches:
- master
- pai-**
pull_request:
branches:
- master
- pai-**
jobs:
deployment:
name: Test deployment on python-${{ matrix.python }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [2.7]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install dnspython==1.13.0 paramiko pyyaml jinja2 python-etcd kubernetes
- name: Test with unittest
run: |
python -m unittest deployment.clusterObjectModel.test.test_cluster_object_model
python -m unittest deployment.clusterObjectModel.test.test_template_generate
python -m unittest deployment.clusterObjectModel.test.test_forward_compatibility
cd deployment
python -m unittest discover test
exporters:
name: Test exporters on python-${{ matrix.python }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
python: [3.7]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Python ${{ matrix.python }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install paramiko pyyaml requests prometheus_client twisted
- name: Test job exporter
run: |
cd src/job-exporter/test
python -m unittest discover .
watchdog:
name: Test watchdog on go-${{ matrix.go }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [1.13.8]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Go ${{ matrix.go }}
uses: actions/setup-go@v1
with:
go-version: ${{ matrix.go }}
architecture: x64
- name: Build watchdog
run: |
cd src/watchdog/src
go build ./cmd/watchdog/main.go
- name: Test watchdog
run: |
cd src/watchdog/src
go test -cover ./pkg/watchdog
rest-server:
name: Test rest server on node-${{ matrix.node }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [10]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: yarn install and test
run: |
cd src/rest-server
yarn install --frozen-lockfiles
yarn test
code-coverage:
name: Run code coverage of rest-server on node-${{ matrix.node }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [10]
os: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: yarn install and test
run: |
cd src/rest-server
yarn install --frozen-lockfiles
yarn test
mkdir ./coverage
yarn run coveralls
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
# Path to lcov file
path-to-lcov: ./src/rest-server/coverage/lcov.info
webportal:
name: Test webportal on node-${{ matrix.node }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [8, 10]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: yarn install, build and test
run: |
cd src/webportal
yarn config set ignore-engines true
yarn install --frozen-lockfiles
yarn build
yarn test
webportal-plugins:
name: Test webportal plugins on node-${{ matrix.node }}-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [10]
os: [ubuntu-18.04, ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Test contrib/submit-job-v2
run: |
cd contrib/submit-job-v2
yarn install --frozen-lockfiles
yarn build