Skip to content

fix(k8s): refuse to serialize KubectlOptions carrying a RestConfig (#… #507

fix(k8s): refuse to serialize KubectlOptions carrying a RestConfig (#…

fix(k8s): refuse to serialize KubectlOptions carrying a RestConfig (#… #507

Workflow file for this run

name: Kubernetes Tests
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
env:
K8S_VERSION: "v1.28.0"
jobs:
kubernetes-tests:
name: Kubernetes Tests
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::087285199408:role/terratest-gha
aws-region: us-east-1
- name: Start minikube
run: minikube start --driver=docker --kubernetes-version=${{ env.K8S_VERSION }}
- name: Run k8s module tests
run: |
mkdir -p /tmp/logs
go test -v -tags kubernetes -count=1 -timeout 20m ./modules/k8s/... 2>&1 | tee /tmp/logs/test_output.log
- name: Run k8s integration tests
run: |
go test -v -tags kubernetes -run TestKubernetes -count=1 -timeout 20m ./test/... 2>&1 | tee -a /tmp/logs/test_output.log
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: kubernetes-test-logs
path: /tmp/logs/
retention-days: 14
helm-tests:
name: Helm Tests
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Install mise
uses: jdx/mise-action@v3
with:
version: 2025.12.10
experimental: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Go module cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download Go modules
run: go mod download
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::087285199408:role/terratest-gha
aws-region: us-east-1
- name: Start minikube
run: minikube start --driver=docker --kubernetes-version=${{ env.K8S_VERSION }}
- name: Run helm module tests
run: |
mkdir -p /tmp/logs
go test -v -tags helm -count=1 -timeout 20m ./modules/helm/... 2>&1 | tee /tmp/logs/test_output.log
- name: Run helm integration tests
run: |
go test -v -tags helm -run TestHelm -count=1 -timeout 20m ./test/... 2>&1 | tee -a /tmp/logs/test_output.log
- name: Upload test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: helm-test-logs
path: /tmp/logs/
retention-days: 14