chore(deps): Bump github.com/onsi/ginkgo/v2 from 2.20.0 to 2.21.0 #208
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Deploy | |
on: [push, pull_request] | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
services: | |
registry: | |
image: registry:2 | |
ports: | |
- 5000:5000 | |
env: | |
CHECKPOINT_DIR: /var/lib/kubelet/checkpoints | |
REGISTRY_PORT: 5000 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
with: | |
driver-opts: network=host | |
- name: Install dependencies | |
run: | | |
# Install bats | |
sudo apt-get update | |
sudo apt-get install -y bats | |
# Install kind | |
curl -sLo kind "$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '[.assets[] | select(.name == "kind-linux-amd64")] | first | .browser_download_url')" | |
chmod +x kind | |
sudo mv kind /bin/ | |
# Install kubectl | |
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" | |
chmod +x kubectl | |
sudo mv kubectl /bin/ | |
- name: Prepare Checkpoints Directory in Host | |
run: | | |
sudo mkdir -p ${{ env.CHECKPOINT_DIR }} | |
sudo chmod 700 ${{ env.CHECKPOINT_DIR }} | |
- name: Generate Checkpoint Tar Files | |
run: ./test/generate_checkpoint_tar.sh | |
- name: Create Kubernetes cluster | |
run: | | |
kind create cluster --config=./test/kind-config.yaml | |
kind export kubeconfig | |
- name: Connect the registry to the Kind network | |
id: connect-registry | |
run: | | |
REGISTRY_ID=$(docker ps -qf "ancestor=registry:2") | |
REGISTRY_NAME=$(docker inspect -f '{{.Name}}' $REGISTRY_ID | sed 's/\///') | |
echo "REGISTRY_NAME=$REGISTRY_NAME" >> $GITHUB_ENV | |
./test/configure_local_registry.sh | |
env: | |
REGISTRY_PORT: ${{ env.REGISTRY_PORT }} | |
REGISTRY_NAME: ${{ env.REGISTRY_NAME }} | |
- name: Build and push to local registry | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: localhost:5000/checkpoint-restore-operator:ci | |
- name: Deploy to Kubernetes | |
run: | | |
make install | |
make deploy IMG=localhost:5000/checkpoint-restore-operator:ci | |
- name: Wait for deployments to be ready | |
run: ./test/wait_for_deployment.sh checkpoint-restore-operator-controller-manager | |
- name: Check resources | |
run: kubectl get all -n checkpoint-restore-operator-system | |
- name: Test Garbage Collection | |
run: sudo -E bats -f "test_garbage_collection" ./test/run_tests.bats | |
- name: Test Max Checkpoints Set to 0 | |
run: sudo -E bats -f "test_max_checkpoints_set_to_0" ./test/run_tests.bats | |
- name: Test Max Checkpoints Set to 1 | |
run: sudo -E bats -f "test_max_checkpoints_set_to_1" ./test/run_tests.bats |