forked from solo-io/wasm
-
Notifications
You must be signed in to change notification settings - Fork 0
180 lines (179 loc) · 5.87 KB
/
pull_request.yaml
File metadata and controls
180 lines (179 loc) · 5.87 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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
name: pull_request
on:
push:
paths:
- "tools/wasme/**"
branches:
- 'master'
pull_request:
paths:
- "tools/wasme/**"
jobs:
codegen:
name: codegen check
runs-on: ubuntu-18.04
steps:
- name: Cancel Previous Actions
uses: styfle/cancel-workflow-action@0.4.1
with:
access_token: ${{ github.token }}
- name: Set up Go 1.15
uses: actions/setup-go@v1
with:
go-version: 1.15
id: go
- name: Install Protoc
uses: solo-io/setup-protoc@master
with:
version: '3.6.1'
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install Helm
run: |
cd $HOME && curl -sSL https://get.helm.sh/helm-v3.2.0-linux-amd64.tar.gz | tar -xzf - linux-amd64/helm && cd -
- name: Generate Code
run: |
export PATH=$HOME/linux-amd64:$PATH
cd ./tools/wasme/cli
./ci/check-code-and-docs-gen.sh
test:
name: end-to-end
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: '1.15.2'
- uses: engineerd/setup-kind@v0.5.0
with:
skipClusterCreation: "true"
- name: Install Protoc
uses: solo-io/setup-protoc@master
with:
version: '3.6.1'
- uses: azure/setup-kubectl@v1
id: kubectl
with:
version: 'v1.18.0'
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup env
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
working-directory: ./tools/wasme/cli
run: |
curl -sSL https://get.helm.sh/helm-v3.2.0-linux-amd64.tar.gz | tar -xzf - linux-amd64/helm
export PATH=$PWD/linux-amd64:$(dirname $KUBECTL):$PATH
make install-deps operator-gen generated-code
./ci/setup-kind.sh
- name: Testing
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
working-directory: ./tools/wasme/cli
run: |
export PATH=$(dirname $KUBECTL):$PATH
export FILTER_IMAGE_GLOO_TAG=webassemblyhub.io/sodman/example-filter:v0.3
export FILTER_BUILD_IMAGE_TAG=localhost:5000/test:v1
export SKIP_PACKAGES=istio,operator
make install-deps run-tests
- name: Debug Info
if: failure()
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
run: |
# see what's in the cluster if we failed
kubectl get all -A
kubectl get configmaps -A
e2e-istio:
name: end-to-end-istio
runs-on: ubuntu-18.04
strategy:
fail-fast: false
matrix:
istio-version: [
'1.6.6',
'1.7.1',
'1.8.4',
'1.9.1'
]
include:
- istio-version: '1.6.6'
istio-binary: 'https://github.com/istio/istio/releases/download/1.6.6/istio-1.6.6-linux-amd64.tar.gz'
istio-filter-image: 'webassemblyhub.io/ilackarms/assemblyscript-test:istio-1.5'
- istio-version: '1.7.1'
istio-binary: 'https://github.com/istio/istio/releases/download/1.7.1/istio-1.7.1-linux-amd64.tar.gz'
istio-filter-image: 'webassemblyhub.io/sodman/istio-1-7:v0.3'
- istio-version: '1.8.4'
istio-binary: 'https://github.com/istio/istio/releases/download/1.8.4/istio-1.8.4-linux-amd64.tar.gz'
istio-filter-image: 'webassemblyhub.io/sodman/istio-1-7:v0.3'
- istio-version: '1.9.1'
istio-binary: 'https://github.com/istio/istio/releases/download/1.9.1/istio-1.9.1-linux-amd64.tar.gz'
istio-filter-image: 'webassemblyhub.io/sodman/istio-1-7:v0.3'
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: '1.15.2'
- uses: engineerd/setup-kind@v0.5.0
with:
skipClusterCreation: "true"
- name: Install Protoc
uses: solo-io/setup-protoc@master
with:
version: '3.6.1'
- uses: azure/setup-kubectl@v1
id: kubectl
with:
version: 'v1.18.0'
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup env
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
ISTIO_VERSION: ${{ matrix.istio-version }}
working-directory: ./tools/wasme/cli
run: |
curl -sSL https://get.helm.sh/helm-v3.2.0-linux-amd64.tar.gz | tar -xzf - linux-amd64/helm
curl -sSL ${{ matrix.istio-binary }} | tar -xzf - istio-${{ matrix.istio-version }}/bin/istioctl
export PATH=$PWD/istio-${{ matrix.istio-version }}/bin:$PWD/linux-amd64:$(dirname $KUBECTL):$PATH
make install-deps operator-gen generated-code
./ci/setup-kind-istio.sh
- name: Testing
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
working-directory: ./tools/wasme/cli
run: |
export PATH=$PWD/linux-amd64:$(dirname $KUBECTL):$PATH
export FILTER_IMAGE_ISTIO_TAG=${{ matrix.istio-filter-image }}
export ISTIO_VERSION=${{ matrix.istio-version }}
export TEST_PKG=pkg/deploy/istio/
make install-deps run-tests
export TEST_PKG=test/e2e/operator/
make install-deps run-tests
- name: Debug Info
if: failure()
env:
KUBECTL: ${{ steps.kubectl.outputs.kubectl-path }}
run: |
# see what's in the cluster if we failed
git diff
kubectl get all -A
kubectl get configmaps -A