Skip to content

update ci

update ci #39

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
env:
KIND_VERSION: v0.26.0
jobs:
test-kind-create:
runs-on: ${{ matrix.runson }}
strategy:
fail-fast: false
#TODO 添加 kcl 版本矩阵
#TODO 添加 linux arm
matrix:
image:
- kindest/node:v1.32.0
- kindest/node:v1.31.0
- kindest/node:v1.30.0
cpcount:
- 1
- 3
workercount:
- 0
- 1
- 3
runson:
- ubuntu-latest
- ubuntu-24.04-arm
steps:
- name: Install
run: |
wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash
- name: install kind
run: |
export ARCH_NAME=`uname -m`
if [ "$ARCH_NAME" != "x86_64" ];then
wget https://kind.sigs.k8s.io/dl/latest/linux-arm64.tgz
tar xvfz linux-arm64.tgz
rm -f linux-amd64.tgz
else
wget https://kind.sigs.k8s.io/dl/latest/linux-amd64.tgz
tar xvfz linux-amd64.tgz
rm -f linux-amd64.tgz
fi
chmod +x kind
mv kind /usr/local/bin/
rm -f e2e-k8s.sh
#wget https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64
#chmod +x kind-linux-amd64
#mv kind-linux-amd64 /usr/local/bin/kind
- uses: actions/checkout@v4
- name: run
run: |
kcl run -D image=${{ matrix.image }} -D cpcount=${{ matrix.cpcount }} -D workercount=${{ matrix.workercount }}
- name: build
run: |
#kcl run -D image=${{ matrix.image }} -D cpcount=${{ matrix.cpcount }} -D workercount=${{ matrix.workercount }}
kcl run -D image=${{ matrix.image }} -D cpcount=${{ matrix.cpcount }} -D workercount=${{ matrix.workercount }} | kind create cluster -v5 --wait 4m --retain --config=-
kubectl wait node --all --for condition=ready
kubectl wait --timeout=5m --for=condition=ready pods --namespace=kube-system --all
kubectl get node
kubectl get pod -A
test-push:
runs-on: ubuntu-latest
steps:
- name: Install
run: |
wget -q https://kcl-lang.io/script/install-cli.sh -O - | /bin/bash
- uses: actions/checkout@v4
- name: mod push
run: |
hack/test.sh