-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.56 KB
/
run-k8s.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
name: K8s CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUST_LOG: INFO
jobs:
tests:
runs-on: ubuntu-22.04-32core
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@stable
- name: Setup Kurtosis
run: |
echo "deb [trusted=yes] https://apt.fury.io/kurtosis-tech/ /" | sudo tee /etc/apt/sources.list.d/kurtosis.list
sudo apt update
sudo apt install kurtosis-cli
kurtosis analytics disable
- name: Setup Minikube
uses: medyagh/setup-minikube@latest
- name: Get Kubeconfig
id: kubeconfig
shell: bash
run: |
cat ~/.kube/config > kubeconfig
echo "kubeconfig=$(cat kubeconfig | base64 -w 0)" >> $GITHUB_OUTPUT
- name: Configure Kubernetes Backend
shell: bash
run: |
kubectl config use-context minikube
kubectl get nodes
echo "Kubernetes engine is ready!"
kurtosis_config=$(kurtosis config path)
echo "config-version: 2" > $kurtosis_config
echo "should-send-metrics: false" >> $kurtosis_config
echo "kurtosis-clusters:" >> $kurtosis_config
echo " docker:" >> $kurtosis_config
echo " type: \"docker\"" >> $kurtosis_config
echo " minikube:" >> $kurtosis_config
echo " type: \"kubernetes\"" >> $kurtosis_config
echo " config:" >> $kurtosis_config
echo " kubernetes-cluster-name: \"minikube\"" >> $kurtosis_config
echo " storage-class: \"standard\"" >> $kurtosis_config
echo " enclave-size-in-megabytes: 200" >> $kurtosis_config
cat $kurtosis_config
kurtosis cluster set minikube
- name: Run kurtosis gateway in background
uses: JarvusInnovations/background-action@v1
with:
run: |
kurtosis gateway
wait-on: |
tcp:localhost:9710
- name: Check kurtosis engine in kubernetes cluster
shell: bash
run: |
kurtosis engine status
kurtosis enclave ls || ( kurtosis engine restart && kurtosis enclave ls )
- name: Setup Devnet
run: |
eval $(minikube -p minikube docker-env)
just devnet-up
- name: Block Building
run: |
just assertor -b
- name: Fallback
run: |
just assertor -f
- name: Devnet Down
run: |
just devnet-down