diff --git a/.github/workflows/kube.yml b/.github/workflows/kube.yml new file mode 100644 index 000000000..62342711b --- /dev/null +++ b/.github/workflows/kube.yml @@ -0,0 +1,39 @@ +name: e2e + +on: + schedule: + - cron: "00 19 * * *" # run ci periodically at 3 am + push: #work for test + +env: + CI_RUST_TOOLCHAIN: 1.70.0 + +jobs: + kube: + name: e2e_kube + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: work with kubernetes + run: | + wget https://github.com/kubernetes-sigs/kind/releases/download/v0.20.0/kind-linux-amd64 + chmod +x kind-linux-amd64 + mv kind-linux-amd64 /usr/local/bin/kind + cat << EOF >> config.yaml + kind: Cluster + apiVersion: kind.x-k8s.io/v1alpha4 + nodes: + - role: control-plane + image: kindest/node:v1.27.0 + kubeadmConfigPatches: + - | + kind: ClusterConfiguration + etcd: + external: + endpoints: + - http://xline:2379 + EOF + docker network create kind + docker run --network kind -e RUST_LOG=debug -it -d --name xline datenlord/xline:latest xline --name node1 --members node1=0.0.0.0:2379 --data-dir /tmp/xline --storage-engine rocksdb + kind create cluster --config config.yaml + kubectl wait node --all --for condition=ready \ No newline at end of file