Add Helm operator #805
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: Functional Tests | |
on: | |
push: | |
branches: [ master, devel ] | |
pull_request: | |
branches: [ master, devel ] | |
# This ensures that previous jobs for the PR are canceled when the PR is | |
# updated. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Testing on Kubernetes ${{ matrix.kube-version }} in ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
kube-version: ['v1.18.20', 'v1.19.16', 'v1.20.15', 'v1.21.14', 'v1.22.17', 'v1.23.17', 'v1.24.14', 'v1.25.10', 'v1.26.5', 'v1.27.2'] | |
os: [ubuntu-20.04, ubuntu-22.04] | |
exclude: | |
- os: ubuntu-22.04 | |
kube-version: 'v1.18.20' | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: 1.20.x | |
check-latest: true | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
- name: Set environment | |
run: | | |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV | |
mkdir -p "$(go env GOPATH)/src/github.com/minio/" | |
ln -s "$PWD" "$(go env GOPATH)/src/github.com/minio/directpv" | |
echo "VERSION=$(git describe --tags --always --dirty)" >> $GITHUB_ENV | |
- name: Build binaries | |
env: | |
CGO_ENABLED: 0 | |
GO111MODULE: on | |
run: | | |
go build -tags "osusergo netgo static_build" -ldflags="-X main.Version=${VERSION} -extldflags=-static" github.com/minio/directpv/cmd/directpv | |
go build -tags "osusergo netgo static_build" -ldflags="-X main.Version=${VERSION} -extldflags=-static" github.com/minio/directpv/cmd/kubectl-directpv | |
- name: Build docker image | |
run: | | |
docker build --quiet -t quay.io/minio/directpv:${VERSION} . | |
docker build --quiet -t example.org/test/sleep:v0.0.1 -f functests/Dockerfile.sleep functests | |
- name: Setup Minikube | |
uses: medyagh/setup-minikube@latest | |
with: | |
driver: none | |
kubernetes-version: ${{ matrix.kube-version }} | |
- name: Check Minikube | |
run: | | |
kubectl get nodes | |
kubectl get pods -A | |
while kubectl get pods -n kube-system --no-headers | grep -vqw Running; do echo "Waiting for Minikube pods to be ready"; sleep 3; done | |
while kubectl get nodes --no-headers | grep -vqw Ready; do echo "Waiting for Minikube node to be ready"; sleep 3; done | |
- name: Run tests | |
run: | | |
functests/run-tests.sh | |
- name: Run migration tests with DirectCSI v3.2.2 | |
run: | | |
sudo rm -fr /var/lib/directpv | |
functests/run-migration-tests.sh "v3.2.2" | |
- name: Run migration tests with DirectCSI v2.0.9 | |
if: contains(fromJson('["v1.18.20", "v1.19.16", "v1.20.15", "v1.21.14", "v1.22.17"]'), matrix.kube-version) | |
run: | | |
sudo rm -fr /var/lib/directpv /var/lib/direct-csi | |
functests/run-migration-tests.sh "v2.0.9" |