forked from vhive-serverless/vHive
-
Notifications
You must be signed in to change notification settings - Fork 0
148 lines (116 loc) · 3.57 KB
/
cri_tests.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
name: vHive cri tests
on:
push:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
pull_request:
branches: [ master ]
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:
env:
GOOS: linux
GO111MODULE: on
jobs:
cri-tests:
name: CRI tests
runs-on: [self-hosted, cri]
steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh
- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build
- name: Run vHive CRI tests
env:
TMPDIR: /root/tmp/
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: make test-cri
- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh
stock-containerd-test:
name: Stock Containerd test
runs-on: [self-hosted, cri]
steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Start Containerd
run: sudo containerd &
- name: Create k8s cluster
run: ./scripts/cluster/create_one_node_cluster.sh stock-only
- name: Deploy zipkin
run: ./scripts/setup_zipkin.sh && sleep 2m
- name: Create helloworld container
run: KUBECONFIG=/etc/kubernetes/admin.conf kn service create helloworld-go --image gcr.io/knative-samples/helloworld-go --env TARGET="vHive CRI test"
- name: Cleaning
if: ${{ always() }}
run: ./scripts/github_runner/clean_cri_runner.sh stock-only
minio-test:
name: Minio test
runs-on: [self-hosted, cri]
steps:
- name: Setup TMPDIR
run: mkdir -p $HOME/tmp
- name: Set up Go 1.15
env:
GOROOT: $HOME/go
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Setup firecracker-containerd
run: ./scripts/setup_firecracker_containerd.sh
- name: Build
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: go build
- name: Start Containerd
run: sudo containerd &
- name: Start Firecracker-containerd
run: sleep 1s && sudo /usr/local/bin/firecracker-containerd --config /etc/firecracker-containerd/config.toml &
- name: Start vHive
run: sleep 1s && sudo ./vhive &
- name: Create k8s cluster
run: sleep 1s && ./scripts/cluster/create_one_node_cluster.sh
- name: modify $PATH
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
- name: Setup minio
env:
GOCACHE: /root/tmp/gocache
GOPATH: /root/tmp/gopath
run: sleep 1m && make -C ./function-images/tests/save_load_minio local
- name: Test minio
run: ./function-images/tests/save_load_minio/scripts/run_minio_k8s.sh
- name: Cleaning
if: ${{ always() }}
run: |
make -C ./function-images/tests/save_load_minio clean
./scripts/github_runner/clean_cri_runner.sh