-
Notifications
You must be signed in to change notification settings - Fork 8
142 lines (120 loc) · 4.66 KB
/
grid_client_nightly.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
# This workflow will install needed dependencies and run main grid tests.
name: Grid Client Nightly
on:
schedule:
- cron: "0 4 * * *"
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
deployment-scripts:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
network: ["dev", "qa", "test", "main"]
env:
NETWORK: ${{ matrix.network }}
RMB_PROXY: true
STORE_SECRET: secret
MNEMONIC: ${{ secrets.MNEMONIC }}
SSH_KEY: ${{ secrets.SSH_KEY }}
steps:
- uses: actions/checkout@v4
with:
ref: refs/tags/v2.5.2
- name: Set up node 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: "yarn"
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y git libtool tmux redis net-tools gh
- name: Install
run: |
yarn
make build
- name: Run test dynamic single vm
id: single_vm
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/dynamic_single_vm.ts
- name: Run test multiple vms
id: multiple_vm
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/multiple_vms.ts
- name: Run test kubernetes
id: k8s
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/orchestrators/kubernetes_leader.ts
- name: Run test vm with qsfs
id: vmqsfs
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/vm_with_qsfs.ts
- name: Run test kubernetes with qsfs
id: k8sqsfs
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/orchestrators/kubernetes_with_qsfs.ts
- name: Run test kvstore
id: kvstore
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/kvstore_example.ts
- name: Run test zdb
id: zdb
if: always()
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/zdb.ts
- name: Cleanup - Delete all contracts
if: always()
id: delete_all
run: |
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/delete_all_contracts.ts
- name: Run check up - List all contracts
run: |
sleep 15
yarn run ts-node --project packages/grid_client/tsconfig-node.json packages/grid_client/scripts/list_all_contracts.ts > output.txt
- name: Check if contracts are Empty
run: |
# print the file content
cat output.txt
# Check if Node contracts are empty
if grep -q "nodeContracts: \[\]" output.txt && ! grep -q "nodeContracts: \[[[:space:]]*\]" output.txt; then
echo "Deletion failed; The Node Contract is not empty."
# Print the contract that couldn't be deleted
exit 1
fi
- name: Find issues
if: failure()
id: find-issues
env:
GH_TOKEN: ${{ github.token }}
run: |
ISSUE_COUNT=$(gh issue list --search "${{github.workflow}} failed during schedule on ${{ env.NETWORK }}" --json title --jq '. | length')
echo "issue_count=$ISSUE_COUNT" >> $GITHUB_ENV
- name: Create GitHub Issue on Failure
if: failure() && env.issue_count == '0'
uses: dacbd/create-issue-action@main
with:
token: ${{ github.token }}
title: ${{github.workflow}} failed during schedule on ${{ env.NETWORK }}
body: |
## Failure Report
> [!IMPORTANT]
> **Details on failed run**: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
- **Dynamic Single Vm**: ${{ steps.single_vm.outcome }}
- **Multiple Vm**: ${{ steps.multiple_vm.outcome }}
- **Kubernetes**: ${{ steps.k8s.outcome }}
- **Vmq QSFS**: ${{ steps.vmqsfs.outcome }}
- **Kubernetes QSFS**: ${{ steps.k8sqsfs.outcome }}
- **Kvstore**: ${{ steps.kvstore.outcome }}
- **Zdb**: ${{ steps.zdb.outcome }}
- **Delete all contracts**: ${{ steps.delete_all.outcome }}
labels: type_bug, grid_client