Skip to content

Commit

Permalink
Temporarily disable other tests from ci
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Jan 18, 2022
1 parent dbc458c commit 0a392ba
Showing 1 changed file with 27 additions and 239 deletions.
266 changes: 27 additions & 239 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ jobs:
- name: Build
run: make build

- name: Run unit tests
run: make check-unit

- name: Validate OCI images manifests
run: go run hack/validate-images/main.go -architectures amd64,arm64,arm

- name: Cache compiled binary for further testing
uses: actions/cache@v2
id: cache-compiled-binary
Expand All @@ -90,84 +84,40 @@ jobs:
k0s
key: build-${{env.cachePrefix}}

build_windows:
name: Build windows
runs-on: ubuntu-latest
steps:
- name: Get PR Reference and Set Cache Name
run: |
PR_NUMBER=$(echo ${GITHUB_REF} | cut -d / -f 3 )
echo "cachePrefix=k0s-win-${PR_NUMBER}-${{ github.sha }}" >> $GITHUB_ENV
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION_WIN }}
id: go

- uses: actions/cache@v2
name: Go modules cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-win-
- name: Bindata cache
uses: actions/cache@v2
id: generated-bindata
with:
path: |
.bins.windows.stamp
embedded-bins/staging/windows/bin/
bindata_windows
pkg/assets/zz_generated_offsets_windows.go
embedded-bins/Makefile.variables
key: ${{ runner.os }}-embedded-bins-win-${{ hashFiles('**/embedded-bins/**/*') }}
restore-keys: |
${{ runner.os }}-embedded-bins-win-${{ hashFiles('**/embedded-bins/**/*') }}
- name: Build
run: make k0s.exe

smoketest:
name: Smoke test
needs: build
runs-on: ubuntu-latest
strategy:
matrix:
smoke-suite:
- check-basic
- check-addons
- check-byocri
- check-calico
- check-cnichange
- check-ctr
- check-customports
- check-dualstack
- check-externaletcd
- check-hacontrolplane
- check-kine
- check-metrics
- check-multicontroller
- check-noderole
- check-singlenode
- check-backup
- check-k0scloudprovider
- check-cli
- check-disabledcomponents
- check-extraargs
- check-configchange
- check-upgrade
- check-psp
- check-statussocket
- check-tunneledkas
- check-workerrestart
- check-kubectl
# - check-basic
# - check-addons
# - check-byocri
# - check-calico
# - check-cnichange
# - check-ctr
# - check-customports
# - check-dualstack
# - check-externaletcd
# - check-hacontrolplane
# - check-kine
# - check-metrics
# - check-multicontroller
# - check-noderole
# - check-singlenode
# - check-backup
# - check-k0scloudprovider
# - check-cli
# - check-disabledcomponents
# - check-extraargs
# - check-configchange
# - check-upgrade
# - check-psp
# - check-statussocket
# - check-tunneledkas
# - check-workerrestart
# - check-kubectl
- check-k0sctl

steps:
Expand Down Expand Up @@ -203,165 +153,3 @@ jobs:
path: |
/tmp/*.log
smoketest-airgap:
name: Smoke test for airgap install
needs: build
runs-on: ubuntu-latest

steps:
- name: Get PR Reference and Set Cache Name
run: |
PR_NUMBER=$(echo ${GITHUB_REF} | cut -d / -f 3 )
echo "cachePrefix=k0s-${PR_NUMBER}-${{ github.sha }}" >> $GITHUB_ENV
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Cache compiled binary for smoke testing
uses: actions/cache@v2
id: restore-compiled-binary
with:
path: |
k0s
key: build-${{env.cachePrefix}}

# We need the bindata cache too so the makefile targets and deps work properly
- name: Bindata cache
uses: actions/cache@v2
id: generated-bindata
with:
path: |
.bins.linux.stamp
embedded-bins/staging/linux/bin/
bindata_linux
pkg/assets/zz_generated_offsets_linux.go
embedded-bins/Makefile.variables
key: ${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}
restore-keys: |
${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}
- name: Cache images bundle
uses: actions/cache@v2
id: restore-bundle
with:
path: |
image-bundle/bundle.tar
key: build-image-bundle-${{env.cachePrefix}}

- name: Run test
run: make check-airgap

- name: Cache images bundle
uses: actions/cache@v2
id: save-bundle
with:
path: |
image-bundle/bundle.tar
key: build-image-bundle-${{env.cachePrefix}}

- name: Collect test logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ env.cachePrefix }}-logs-check-airgap-${{ github.run_number }}
path: |
/tmp/*.log
smoketest-arm:
name: Smoke test on arm64
runs-on: [self-hosted,linux,arm64]

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
id: go

- uses: actions/cache@v2
name: Go modules cache
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Bindata cache
uses: actions/cache@v2
id: generated-bindata
with:
path: |
.bins.linux.stamp
embedded-bins/staging/linux/bin/
bindata_linux
pkg/assets/zz_generated_offsets_linux.go
embedded-bins/Makefile.variables
key: ${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}-arm64
restore-keys: |
${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}-arm64
- name: Build
run: make build

- name: Run test .
run: make -C inttest check-basic

- name: Collect test logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ env.cachePrefix }}-logs-check-basic-arm-${{ github.run_number }}
path: |
/tmp/*.log
smoketest-armv7:
name: Smoke test on armv7
runs-on: [self-hosted,linux,arm]
steps:
# We cannot rely on this as it's not working on arm, see https://github.com/actions/setup-go/issues/106
# Instead we must have proper golang version setup at system level.
# - name: Set up Go 1.x
# uses: actions/setup-go@v2
# with:
# go-version: ${{ env.GO_VERSION }}
# id: go
- name: Install GoLang for ARMHF
run: "echo $HOME/.local/go/bin >> $GITHUB_PATH; rm -rf $HOME/.local/go && mkdir -p $HOME/.local/go && curl --silent -L https://golang.org/dl/$(curl --silent -L 'https://golang.org/VERSION?m=text').linux-armv6l.tar.gz | tar -C $HOME/.local -xz"
- name: Go Version
run: go version

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Bindata cache
uses: actions/cache@v2
id: generated-bindata
with:
path: |
.bins.linux.stamp
embedded-bins/staging/linux/bin/
bindata_linux
pkg/assets/zz_generated_offsets_linux.go
embedded-bins/Makefile.variables
key: ${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}-armv7
restore-keys: |
${{ runner.os }}-embedded-bins-${{ hashFiles('**/embedded-bins/**/*') }}-armv7
- name: Build
run: make build

- name: Run test .
run: TIMEOUT=15m make -C inttest check-basic

- name: Collect test logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: ${{ env.cachePrefix }}-logs-check-basic-armv7-${{ github.run_number }}
path: |
/tmp/*.log

0 comments on commit 0a392ba

Please sign in to comment.