-
Notifications
You must be signed in to change notification settings - Fork 26
191 lines (162 loc) · 5.71 KB
/
smoke-tests.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
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
187
188
189
190
191
name: Smoke tests
on:
# Run every day at 20:00 UTC
schedule:
- cron: '0 20 * * *'
workflow_dispatch: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-smoke-tests
cancel-in-progress: true
jobs:
smoke-test-1:
runs-on: ubuntu-latest
strategy:
matrix:
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ]
fail-fast: false
max-parallel: 4
env:
CONFIG_FILE: "starship/tests/smoke/ci/${{ matrix.config-file }}"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create yarn.lock and package.json file if not exists
run: |
if [ ! -f $GITHUB_WORKSPACE/yarn.lock ]; then
echo 'Creating temporary yarn.lock file'
echo '' > $GITHUB_WORKSPACE/yarn.lock
fi
if [ ! -f $GITHUB_WORKSPACE/package.json ]; then
echo 'Creating temporary package.json file'
echo '{}' > $GITHUB_WORKSPACE/package.json
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- name: Install starship CLI
run: |
cd clients/js
yarn
yarn build
chmod +x node_modules/.bin/starship
echo "PATH=$GITHUB_WORKSPACE/clients/js/node_modules/.bin:$PATH" >> $GITHUB_ENV
- name: Setup Test infra
id: starship-action
uses: cosmology-tech/[email protected]
with:
config: ${{ env.CONFIG_FILE }}
chart: ./starship/charts/devnet
cli-version: 0.0.0
# todo: change this to be post step of the action
- name: Cleanup cluster
if: always()
run: |
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true
env:
DEVNET_NAME: ${{ steps.starship-action.outputs.name }}
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }}
smoke-test-2:
needs: [smoke-test-1]
runs-on: ubuntu-latest
strategy:
matrix:
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ]
fail-fast: true
max-parallel: 4
env:
CONFIG_FILE: "starship/tests/smoke/ci/${{ matrix.config-file }}"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create yarn.lock and package.json file if not exists
run: |
if [ ! -f $GITHUB_WORKSPACE/yarn.lock ]; then
echo 'Creating temporary yarn.lock file'
echo '' > $GITHUB_WORKSPACE/yarn.lock
fi
if [ ! -f $GITHUB_WORKSPACE/package.json ]; then
echo 'Creating temporary package.json file'
echo '{}' > $GITHUB_WORKSPACE/package.json
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- name: Install starship CLI
run: |
cd clients/js
yarn
yarn build
chmod +x node_modules/.bin/starship
echo "PATH=$GITHUB_WORKSPACE/clients/js/node_modules/.bin:$PATH" >> $GITHUB_ENV
- name: Setup Test infra
id: starship-action
uses: cosmology-tech/[email protected]
with:
config: ${{ env.CONFIG_FILE }}
chart: ./starship/charts/devnet
cli-version: 0.0.0
# todo: change this to be post step of the action
- name: Cleanup cluster
if: always()
run: |
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true
env:
DEVNET_NAME: ${{ steps.starship-action.outputs.name }}
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }}
smoke-test-3:
needs: [smoke-test-2]
runs-on: ubuntu-latest
strategy:
matrix:
config-file: [ "one-chain.yaml", "osmojs.yaml", "simapp.yaml", "multi-validator.yaml" ]
fail-fast: true
max-parallel: 4
env:
CONFIG_FILE: "starship/tests/smoke/ci/${{ matrix.config-file }}"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Create yarn.lock and package.json file if not exists
run: |
if [ ! -f $GITHUB_WORKSPACE/yarn.lock ]; then
echo 'Creating temporary yarn.lock file'
echo '' > $GITHUB_WORKSPACE/yarn.lock
fi
if [ ! -f $GITHUB_WORKSPACE/package.json ]; then
echo 'Creating temporary package.json file'
echo '{}' > $GITHUB_WORKSPACE/package.json
fi
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
cache: "yarn"
- name: Install starship CLI
run: |
cd clients/js
yarn
yarn build
chmod +x node_modules/.bin/starship
echo "PATH=$GITHUB_WORKSPACE/clients/js/node_modules/.bin:$PATH" >> $GITHUB_ENV
- name: Setup Test infra
id: starship-action
uses: cosmology-tech/[email protected]
with:
config: ${{ env.CONFIG_FILE }}
chart: ./starship/charts/devnet
cli-version: 0.0.0
# todo: change this to be post step of the action
- name: Cleanup cluster
if: always()
run: |
helm delete $DEVNET_NAME --debug --namespace $DEVNET_NAMESPACE --wait || true
kubectl delete namespace $DEVNET_NAMESPACE --wait=true || true
env:
DEVNET_NAME: ${{ steps.starship-action.outputs.name }}
DEVNET_NAMESPACE: ${{ steps.starship-action.outputs.namespace }}