Skip to content

Bump k8s.io/api from 0.30.3 to 0.31.0 #197

Bump k8s.io/api from 0.30.3 to 0.31.0

Bump k8s.io/api from 0.30.3 to 0.31.0 #197

Workflow file for this run

---
# based on https://github.com/mvdan/github-actions-golang
name: Test
on:
pull_request:
branches: ["main"]
paths-ignore: ["docs/**"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
test:
strategy:
matrix:
go-version: [1.22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
# cache go modules
- uses: actions/cache@v4
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run linting & unittest
if: matrix.os == 'ubuntu-latest'
run: make ci
- name: Build package
run: make build
- name: Execute build
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: ./out/bin/rename-pvc --help
- name: Execute build
if: matrix.os == 'windows-latest'
run: ./out/bin/rename-pvc.exe --help
test-kind:
strategy:
matrix:
go-version: [1.22.x]
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Create k8s Kind Cluster
uses: helm/[email protected]
with:
cluster_name: kind
- name: Checkout code
uses: actions/checkout@v4
# cache go modules
- uses: actions/cache@v4
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build package
run: make build
- name: Create PVC and deployment
run: kubectl apply -f .github/kind-test/
- name: Wait until pod is ready
run: kubectl wait --for=condition=ready pod/test
- name: Delete pod
run: kubectl delete --wait -f .github/kind-test/pod.yaml
- name: Execute rename
run: ./out/bin/rename-pvc -y pvc pvc-new
- name: Check rename
run: kubectl get pvc pvc-new