Skip to content

Commit

Permalink
CI: disable k8s integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
nixargh committed Sep 9, 2024
1 parent c452e39 commit 9a64f32
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 42 deletions.
81 changes: 41 additions & 40 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,43 +156,44 @@ jobs:
VERSION: "${{ steps.extract_tag.outputs.tag }}"
run: make build-publish-image-all

integration-test-k8s:
name: Integration test Kubernetes
runs-on: ubuntu-latest
strategy:
matrix:
kubernetes: [1.31.0]
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Execute tests
env:
KIND_VERSION: v0.24.0
run: |
# Get dependencies.
echo "Getting dependencies..."
curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v${{ matrix.kubernetes }}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
# Start cluster.
echo "Starting ${{ matrix.kubernetes }} Kubernetes cluster..."
kind create cluster --image kindest/node:v${{ matrix.kubernetes }}
kind get kubeconfig > /tmp/test.kubeconfig
# Register CRDs.
kubectl apply -f ./pkg/kubernetes/gen/crd/
kubectl apply -f ./test/integration/crd
# Build binary.
echo "Building binary..."
make ci-build
sudo mv ./bin/sloth /usr/local/bin/
# Execute integration tests.
echo "Executing integration tests..."
export SLOTH_INTEGRATION_KUBE_CONFIG=/tmp/test.kubeconfig
make ci-integration-k8s
# integration-test-k8s:
# name: Integration test Kubernetes
# runs-on: ubuntu-latest
# strategy:
# matrix:
# kubernetes: [1.31.0]
# steps:
# - uses: actions/checkout@v4
#
# - uses: actions/setup-go@v5
# with:
# go-version-file: go.mod
#
# - name: Execute tests
# env:
# KIND_VERSION: v0.24.0
# run: |
# # Get dependencies.
# echo "Installing 'king' & 'kubectl'."
# curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
# curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v${{ matrix.kubernetes }}/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/
#
# # Start cluster.
# echo -e "\nStarting ${{ matrix.kubernetes }} Kubernetes cluster..."
# kind create cluster --image kindest/node:v${{ matrix.kubernetes }}
# kind get kubeconfig > /tmp/test.kubeconfig
#
# # Register CRDs.
# echo -e "\nCreating our CRDs."
# kubectl apply -f ./pkg/kubernetes/gen/crd/
# kubectl apply -f ./test/integration/crd
#
# # Build binary.
# echo -e "\nBuilding binary."
# make ci-build
# sudo mv ./bin/sloth /usr/local/bin/
#
# # Execute integration tests.
# echo -e "\nExecuting integration tests."
# export SLOTH_INTEGRATION_KUBE_CONFIG=/tmp/test.kubeconfig
# make ci-integration-k8s
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@

# Sloth

[![Apache 2 licensed](https://img.shields.io/badge/license-Apache2-blue.svg)](https://raw.githubusercontent.com/ostrovok-tech/sloth/main/LICENSE)
[![CI](https://github.com/ostrovok-tech/sloth/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/ostrovok-tech/sloth/actions/workflows/ci.yaml)
[![Go Report Card](https://goreportcard.com/badge/github.com/ostrovok-tech/sloth)](https://goreportcard.com/report/github.com/ostrovok-tech/sloth)
[![Apache 2 licensed](https://img.shields.io/badge/license-Apache2-blue.svg)](https://raw.githubusercontent.com/ostrovok-tech/sloth/main/LICENSE)
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/ostrovok-tech/sloth)](https://github.com/ostrovok-tech/sloth/releases/latest)
![Kubernetes release](https://img.shields.io/badge/Kubernetes-v1.25-green?logo=Kubernetes&style=flat&color=326CE5&logoColor=white)
[![OpenSLO](https://img.shields.io/badge/OpenSLO-v1alpha-green?color=4974EA&style=flat)](https://github.com/OpenSLO/OpenSLO#slo)
<-- ![Kubernetes release](https://img.shields.io/badge/Kubernetes-v1.25-green?logo=Kubernetes&style=flat&color=326CE5&logoColor=white) -->

## Introduction

Expand Down

0 comments on commit 9a64f32

Please sign in to comment.