Skip to content

Update to v1.33.2 (#12533) #876

Update to v1.33.2 (#12533)

Update to v1.33.2 (#12533) #876

Workflow file for this run

name: Integration Test Coverage
on:
push:
paths-ignore:
- "**.md"
- "channel.yaml"
- "install.sh"
- "tests/**"
- "!tests/integration**"
- ".github/**"
- "!.github/workflows/integration.yaml"
pull_request:
paths-ignore:
- "**.md"
- "channel.yaml"
- "install.sh"
- "tests/**"
- "!tests/integration**"
- "!tests/e2e**"
- ".github/**"
- "!.github/workflows/integration.yaml"
- "!.github/workflows/build-k3s.yaml"
workflow_dispatch: {}
permissions:
contents: read
env:
GOCOVERDIR: /tmp/k3scov
jobs:
build:

Check failure on line 32 in .github/workflows/integration.yaml

View workflow run for this annotation

GitHub Actions / Integration Test Coverage

Invalid workflow file

The workflow is not valid. .github/workflows/integration.yaml (Line: 32, Col: 3): Error calling workflow 'manuelbuil/k3s/.github/workflows/build-k3s.yaml@6d076f4dd0695aa8e5681056faa2977c09923a49'. The nested job 'build' is requesting 'packages: write', but is only allowed 'packages: read'.
permissions:
contents: read
packages: read
uses: ./.github/workflows/build-k3s.yaml
with:
os: linux
cache: read
build-windows:
uses: ./.github/workflows/build-k3s.yaml
with:
os: windows
itest:
needs: build
name: Integration Tests
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
itest: [certrotation, cacertrotation, etcdrestore, localstorage, startup, custometcdargs, etcdsnapshot, kubeflags, longhorn, secretsencryption, flannelnone]
max-parallel: 3
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install Go
uses: ./.github/actions/setup-go
- name: "Download k3s binary"
uses: actions/download-artifact@v4
with:
name: k3s-amd64
path: ./dist/artifacts
- name: Run Integration Tests
run: |
chmod +x ./dist/artifacts/k3s
mkdir -p $GOCOVERDIR
sudo -E env "PATH=$PATH" go test -timeout=45m ./tests/integration/${{ matrix.itest }}/... -run Integration -ginkgo.v -test.v
- name: On Failure, Launch Debug Session
uses: lhotari/action-upterm@v1
if: ${{ failure() }}
with:
## If no one connects after 5 minutes, shut down server.
wait-timeout-minutes: 5
- name: Generate coverage report
run: go tool covdata textfmt -i $GOCOVERDIR -o ${{ matrix.itest }}.out
- name: Upload Results To Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./${{ matrix.itest }}.out
flags: inttests # optional
verbose: true # optional (default = false)
itest-windows:
name: Integration Tests (windows)
needs: build-windows
runs-on: windows-2022
timeout-minutes: 10
env:
GOCOVERDIR: "D:/tmp/k3scov"
steps:
- name: Checkout
uses: actions/checkout@v4
with: {fetch-depth: 1}
- name: Install Go
uses: ./.github/actions/setup-go
- name: Download k3s binary
uses: actions/download-artifact@v4
with:
name: k3s-windows
path: dist/artifacts/
- name: Run K3s
timeout-minutes: 5
env:
CONTAINERD_LOG_LEVEL: "debug"
run: |
$ErrorActionPreference = "Continue"
$PSNativeCommandUseErrorActionPreference = $true
New-Item -Type Directory -Force $Env:GOCOVERDIR | Out-Null
$Server = Start-Job -ScriptBlock { ./dist/artifacts/k3s.exe server --token=token --debug --disable=metrics-server }
Start-Sleep -Seconds 15
D:/var/lib/rancher/k3s/data/current/bin/k3s.exe kubectl apply -f ./tests/integration/startup/testdata/agnhost.yaml
D:/var/lib/rancher/k3s/data/current/bin/k3s.exe kubectl wait --for=jsonpath='{.status.phase}'=Running --timeout=5m pod/agnhost
D:/var/lib/rancher/k3s/data/current/bin/k3s.exe crictl ps
D:/var/lib/rancher/k3s/data/current/bin/k3s.exe kubectl get pod -A -o wide
D:/var/lib/rancher/k3s/data/current/bin/k3s.exe kubectl get node -o wide
$RET = $LASTEXITCODE
Stop-Job -Job $Server
Receive-Job -Wait -Job $Server
Remove-Job -Job $Server
exit $RET
- name: Generate coverage report
run: go tool covdata textfmt -i $Env:GOCOVERDIR -o windows.out
- name: Upload Results To Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./windows.out
flags: inttests # optional
verbose: true # optional (default = false)