Build and run Integration tests on arm64 #2141
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: 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" | |
workflow_dispatch: {} | |
permissions: | |
contents: read | |
env: | |
GOCOVERDIR: /tmp/k3scov | |
jobs: | |
build: | |
uses: ./.github/workflows/build-k3s.yaml | |
build-arm64: | |
if : github.repository == 'k3s-io/k3s' | |
uses: ./.github/workflows/build-k3s.yaml | |
with: | |
arch: arm64 | |
itest-arm64: | |
needs: build-arm64 | |
name: Integration Tests Arm64 | |
if: github.repository == 'k3s-io/k3s' | |
runs-on: oracle-aarch64-4cpu-16gb | |
strategy: | |
fail-fast: false | |
matrix: | |
itest: [certrotation, 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: actions/setup-go@v5 | |
with: | |
go-version-file: 'go.mod' | |
cache: false | |
- name: "Download k3s binary" | |
uses: actions/download-artifact@v4 | |
with: | |
name: k3s-arm | |
path: ./dist/artifacts | |
- name: Run Integration Tests | |
run: | | |
chmod +x ./dist/artifacts/k3s | |
mkdir -p $GOCOVERDIR | |
sudo -E env "PATH=$PATH" go test -v -timeout=45m ./tests/integration/${{ matrix.itest }}/... -run Integration | |
itest-amd64: | |
needs: build | |
name: Integration Tests | |
runs-on: ubuntu-latest | |
timeout-minutes: 45 | |
strategy: | |
fail-fast: false | |
matrix: | |
itest: [certrotation, 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 | |
path: ./dist/artifacts | |
- name: Run Integration Tests | |
run: | | |
chmod +x ./dist/artifacts/k3s | |
mkdir -p $GOCOVERDIR | |
sudo -E env "PATH=$PATH" go test -v -timeout=45m ./tests/integration/${{ matrix.itest }}/... -run Integration | |
- name: On Failure, Launch Debug Session | |
uses: dereknola/action-upterm@v1.1 | |
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@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: ./${{ matrix.itest }}.out | |
flags: inttests # optional | |
verbose: true # optional (default = false) |