Skip to content

[WIP] k8s workflow tests #1

[WIP] k8s workflow tests

[WIP] k8s workflow tests #1

name: Deploy Devnet
on: [ push, pull_request ]
jobs:
deploy_devnet:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
ref: ${{ github.event.before }}
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- 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" \
&& sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
&& kubectl version --client
- name: Install kind
run: go install sigs.k8s.io/[email protected]
- name: Create local k8s cluster
run: |
pwd
kind create cluster --name regression-tester --config .github/workflows/kind-config.yaml.sample
kubectl cluster-info --context kind-regression-tester
- name: Clone and then build devnet images
run: |
eval `ssh-agent -s`
ssh-add - <<< '${{ secrets.SSH_PRIVATE_KEY }}'
git clone [email protected]:maticnetwork/polygon-devnets.git
cd polygon-devnets/docker/pos
make all DEV=true K8S_ENV=true K8S_NS=test
- name: Load images into cluster
run: kind load docker-image ganache:latest heimdall:latest bor:latest workload:latest status:latest --name regression-tester
- name: Deploy devnet
run: kubectl apply -k . --context kind-regression-tester
- name: Check deployed resources
run: kubectl get pods -n test