Skip to content

Commit

Permalink
Build and run Integration tests on arm64
Browse files Browse the repository at this point in the history
Signed-off-by: Derek Nola <derek.nola@suse.com>
  • Loading branch information
dereknola committed Aug 14, 2024
1 parent 1991102 commit 41907b3
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 63 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/arm_test.yaml

This file was deleted.

32 changes: 7 additions & 25 deletions .github/workflows/build-k3s.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: "Save K3s image"
if: inputs.upload-image == true
run: docker image save rancher/k3s -o ./dist/artifacts/k3s-image.tar
- name: "Upload K3s binary"
- name: "Upload K3s Artifacts"
if: inputs.upload-repo == false
uses: actions/upload-artifact@v4
with:
Expand All @@ -68,32 +68,14 @@ jobs:
run: |
DOCKER_BUILDKIT=1 SKIP_IMAGE=1 SKIP_AIRGAP=1 SKIP_VALIDATE=1 GOCOVER=1 make
sha256sum dist/artifacts/k3s | sed 's|dist/artifacts/||' > dist/artifacts/k3s.sha256sum
- name: Build K3s image
- name: Build and save K3s image
if: inputs.upload-image == true
run: make package-image
- name: bundle repo
if: inputs.upload-repo == true
run: |
tar -czvf ../k3s-repo.tar.gz .
mv ../k3s-repo.tar.gz .
- name: "Upload K3s directory"
if: inputs.upload-repo == true
uses: actions/upload-artifact@v4
with:
name: k3s-repo.tar.gz
path: k3s-repo.tar.gz
- name: "Save K3s image"
if: inputs.upload-image == true
run: docker image save rancher/k3s -o ./dist/artifacts/k3s-image.tar
- name: "Upload K3s binary"
make package-image
docker image save rancher/k3s -o ./dist/artifacts/k3s-image.tar
- name: "Upload K3s Artifacts"
if: inputs.upload-repo == false
uses: actions/upload-artifact@v4
with:
name: k3s
path: dist/artifacts/k3s*
- 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: k3s-arm
path: dist/artifacts/k3s*
37 changes: 36 additions & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,42 @@ env:
jobs:
build:
uses: ./.github/workflows/build-k3s.yaml
itest:
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
Expand Down

0 comments on commit 41907b3

Please sign in to comment.