Skip to content

add workspace flag for lerna.json #78

add workspace flag for lerna.json

add workspace flag for lerna.json #78

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
KUBERNETES_API_URL: http://127.0.0.1:8001
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 10.12.2
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: '20.x'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Install kubectl
run: |
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x kubectl
sudo mv kubectl /usr/local/bin/
- name: Install Kind
run: |
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-amd64
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
- name: Create Kind cluster
run: |
cat <<EOF > kind-config.yaml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraPortMappings:
- containerPort: 30000
hostPort: 30000
protocol: TCP
EOF
kind create cluster --config kind-config.yaml --wait 5m
- name: Wait for cluster to be ready
run: |
kubectl wait --for=condition=Ready nodes --all --timeout=300s
kubectl wait --for=condition=Ready pods --all -n kube-system --timeout=300s
- name: Start kubectl proxy
run: kubectl proxy --port=8001 &
- name: Run kubernetesjs tests
working-directory: packages/kubernetesjs
run: pnpm test