-
Notifications
You must be signed in to change notification settings - Fork 498
66 lines (61 loc) · 2.62 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-24.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: go/src/github.com/${{ github.repository }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go/src/github.com/${{ github.repository }}/go.mod
go-version: 1.21.3
- 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@v4
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: YXBpVmVyc2lvbjogY2hhb3MtbWVzaC5vcmcvdjFhbHBoYTEKa2luZDogU2NoZWR1bGUKbWV0YWRhdGE6CiAgbmFtZTogcG9kLWZhaWx1cmUKICBuYW1lc3BhY2U6IHBpbmdjYXAKc3BlYzoKICBzY2hlZHVsZTogJ0BldmVyeSA1bScKICB0eXBlOiBQb2RDaGFvcwogIGhpc3RvcnlMaW1pdDogNQogIGNvbmN1cnJlbmN5UG9saWN5OiBGb3JiaWQKICBwb2RDaGFvczoKICAgIGFjdGlvbjogcG9kLWZhaWx1cmUKICAgIG1vZGU6IG9uZQogICAgZHVyYXRpb246IDYwcwogICAgc2VsZWN0b3I6CiAgICAgIGxhYmVsU2VsZWN0b3JzOgogICAgICAgIGFwcC5rdWJlcm5ldGVzLmlvL2NvbXBvbmVudDogY29udHJvbGxlci1tYW5hZ2VyCg==
CHAOS_MESH_VERSION: v2.1.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