Skip to content

Commit 2298d3d

Browse files
committed
Bring back the kind remote net tests
1 parent e138c97 commit 2298d3d

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

.github/workflows/rust.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,33 @@ jobs:
9494
run: |
9595
cargo test -p linera-service remote_net_grpc --features remote-net
9696
97+
remote-kubernetes-net-test:
98+
needs: changed-files
99+
if: needs.changed-files.outputs.should-run == 'true'
100+
runs-on: ubuntu-latest-8-cores
101+
timeout-minutes: 40
102+
103+
steps:
104+
- uses: actions/checkout@v4
105+
- uses: actions-rust-lang/setup-rust-toolchain@v1
106+
- name: Install Protoc
107+
uses: arduino/setup-protoc@v3
108+
with:
109+
repo-token: ${{ secrets.GITHUB_TOKEN }}
110+
- name: Build binaries
111+
run: |
112+
cargo build --features storage-service --bin linera-server --bin linera-proxy --bin linera
113+
- name: Run the validators with Kubernetes
114+
run: |
115+
mkdir /tmp/local-linera-net
116+
cargo run --bin linera --features kubernetes -- net up --kubernetes --policy-config testnet --path /tmp/local-linera-net --validators 2 --shards 2 --with-faucet --faucet-port 8078 --faucet-amount 1000 &
117+
- name: Wait for faucet to be ready
118+
run: |
119+
until curl -s http://localhost:8078 >/dev/null; do sleep 1; done
120+
- name: Run the Kubernetes tests
121+
run: |
122+
cargo test -p linera-service remote_net_grpc --features remote-net
123+
97124
execution-wasmtime-test:
98125
needs: changed-files
99126
if: needs.changed-files.outputs.should-run == 'true'

linera-service/src/cli_wrappers/helmfile.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,12 @@ impl HelmFile {
4242
)
4343
.env("LINERA_HELMFILE_SET_NUM_SHARDS", num_shards.to_string())
4444
.env("LINERA_HELMFILE_LINERA_IMAGE", docker_image_name)
45+
.env(
46+
"LINERA_HELMFILE_SET_KUBE_CONTEXT",
47+
format!("kind-{}", cluster_id),
48+
)
4549
.arg("sync")
4650
.arg("--wait")
47-
.args(["--kube-context", &format!("kind-{}", cluster_id)])
4851
.spawn_and_wait()
4952
.await
5053
}

0 commit comments

Comments
 (0)