admin: add resources to repair job containers (#1023) #1492
Workflow file for this run
This file contains hidden or 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: | |
| fail-fast: false | |
| matrix: | |
| kube-version: ['v1.28.15', 'v1.29.14', 'v1.30.14', 'v1.31.14', 'v1.32.13', 'v1.33.9', 'v1.34.5', 'v1.35.2'] | |
| os: [ubuntu-22.04, ubuntu-24.04] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: 1.26.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 | |
| # To Fix: chmod: cannot access '/etc/cni/net.d': No such file or directory | |
| sudo mkdir -p /etc/cni/net.d | |
| - 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: 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: 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: Enable kustomize | |
| if: contains(fromJson('["v1.28.15", "v1.29.14"]'), matrix.kube-version) | |
| run: | | |
| echo "KUSTOMIZE=true" >> $GITHUB_ENV | |
| - 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" |