-
Notifications
You must be signed in to change notification settings - Fork 499
66 lines (61 loc) · 2.53 KB
/
chaos.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
name: chaos
on:
pull_request:
branches:
- master
- release-*
jobs:
pull:
runs-on: ubuntu-20.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version-file: go/src/github.com/${{ github.repository }}/go.mod
check-latest: true
- name: Set vars
run: |
echo "GOCACHE=$(go env GOCACHE)" >> $GITHUB_ENV
echo "GOMODCACHE=$(go env GOMODCACHE)" >> $GITHUB_ENV
- name: Try to use build cache
uses: actions/cache@v3
with:
path: |
${{ env.GOCACHE }}
${{ env.GOMODCACHE }}
key: ${{ runner.os }}-go-${{ hashFiles(format('go/src/github.com/{0}/**/go.sum', github.repository)) }}
restore-keys: |
${{ runner.os }}-go-
- name: Creating kind cluster
run: |
SKIP_BUILD=y SKIP_IMAGE_BUILD=y SKIP_DOWN=y SKIP_TEST=y KUBE_WORKERS=0 ./hack/e2e.sh
echo "info: waiting for all nodes to be ready"
kubectl wait --for=condition=Ready nodes --all --timeout=120s
echo "info: waiting for all pods in kube-system namespace to be ready"
kubectl -n kube-system wait --for=condition=Ready pods --all
echo "info: print cluster information"
kubectl get nodes
kubectl get pods -n kube-system
helm version
kubectl version
echo "info: create pingcap namespace for chaos configurations"
kubectl create ns pingcap
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
- name: Run chaos mesh
uses: chaos-mesh/chaos-mesh-actions@master
env:
CFG_BASE64: YXBpVmVyc2lvbjogY2hhb3MtbWVzaC5vcmcvdjFhbHBoYTEKa2luZDogUG9kQ2hhb3MKbWV0YWRhdGE6CiAgbmFtZTogcG9kLWZhaWx1cmUKICBuYW1lc3BhY2U6IHBpbmdjYXAKc3BlYzoKICBhY3Rpb246IHBvZC1mYWlsdXJlIAogIG1vZGU6IG9uZSAKICBkdXJhdGlvbjogIjYwcyIKICBzZWxlY3RvcjoKICAgIGxhYmVsU2VsZWN0b3JzOgogICAgICAiYXBwLmt1YmVybmV0ZXMuaW8vY29tcG9uZW50IjogImNvbnRyb2xsZXItbWFuYWdlciIKICBzY2hlZHVsZXI6CiAgICBjcm9uOiAiQGV2ZXJ5IDVtIgo=
CHAOS_MESH_VERSION: v1.0.0
- name: Run e2e
run: |
SKIP_UP=y ./hack/e2e.sh -- --ginkgo.focus='Restarter'
working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}
- name: Set up tmate session
if: ${{ failure() }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 60