-
Notifications
You must be signed in to change notification settings - Fork 14
162 lines (147 loc) · 5 KB
/
test_on_pr.yaml
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
name: HPO Test on Pull Request
# Controls when the action will run.
on:
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test_on_docker:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Build hpo
run: |
echo Software versions
python --version
curl -V
echo Building hpo container image
ls
./build_hpo.sh -o hpo:test
docker images | grep hpo
- name: GRPC Sanity test on docker
run: |
echo Installing grpcio package
pip install grpcio
echo Install protobuf 4.21.8
pip install protobuf==4.21.8
echo Running GRPC sanity test on docker
ls
cd tests
./test_hpo.sh -c docker -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_grpc_sanity_test
- name: Sanity test on docker
run: |
echo Running sanity test on docker
ls
cd tests
./test_hpo.sh -c docker -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_sanity_test
- name: Archive results
if: always()
run: |
cd ${GITHUB_WORKSPACE}
tar cvf hpo_docker_results.tar hpo_test_results
- name: Upload results
if: always()
uses: actions/upload-artifact@v3
with:
name: hpo-results
path: ./hpo_docker_results.tar
retention-days: 2
test_on_minikube:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Setup Minikube
uses: manusa/[email protected]
with:
minikube version: 'v1.16.0'
kubernetes version: 'v1.19.2'
- name: Display minikube cluster info and pods
run: |
kubectl cluster-info
kubectl get pods -n kube-system
- name: Build hpo
run: |
echo Software versions
python --version
curl -V
echo Building hpo container image
ls
./build_hpo.sh -o hpo:test
docker images | grep hpo
- name: Sanity test on minikube
run: |
ps -ef | grep python
echo Running sanity test on minikube
ls
cp ./manifests/hpo-deployment.yaml_template ./manifests/hpo-deployment.yaml_template.old
sed -e "s/imagePullPolicy: Always/imagePullPolicy: IfNotPresent/g" ./manifests/hpo-deployment.yaml_template.old > ./manifests/hpo-deployment.yaml_template
cd tests
./test_hpo.sh -c minikube -o hpo:test --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests \
--testcase=hpo_sanity_test
- name: Archive results
if: always()
run: |
cd ${GITHUB_WORKSPACE}
ls
tar cvf hpo_minikube_results.tar hpo_test_results
ls
- name: Upload results
if: always()
uses: actions/upload-artifact@v3
with:
name: hpo-results
path: ./hpo_minikube_results.tar
retention-days: 2
test_on_native:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Sanity test on native
run: |
echo Software versions
python --version
curl -V
echo Running sanity test on native
cd tests
./test_hpo.sh -c native --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_sanity_test
- name: Archive results
if: always()
run: |
cd ${GITHUB_WORKSPACE}
tar cvf hpo_native_results.tar hpo_test_results
- name: Upload results
if: always()
uses: actions/upload-artifact@v3
with:
name: hpo-results
path: ./hpo_native_results.tar
retention-days: 2
grpc_test_on_native:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: GRPC Sanity test on native
run: |
echo Software versions
python --version
curl -V
echo Running GRPC sanity test on native
cd tests
./test_hpo.sh -c native --resultsdir=${GITHUB_WORKSPACE} --testsuite=hpo_api_tests --testcase=hpo_grpc_sanity_test
- name: Archive results
if: failure()
run: |
cd ${GITHUB_WORKSPACE}
tar cvf hpo_grpc_native_results.tar hpo_test_results
- name: Upload results
if: failure()
uses: actions/upload-artifact@v3
with:
name: hpo-results
path: ./hpo_grpc_native_results.tar
retention-days: 2