Add integration tests to CI workflow

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
Ahmet Alp Balkan 2020-04-29 13:40:11 -07:00
parent d669862436
commit e5024778a9
No known key found for this signature in database
GPG Key ID: 441833503E604E2C
2 changed files with 9 additions and 13 deletions

View File

@ -18,8 +18,16 @@ jobs:
run: go mod tidy && git diff --no-patch --exit-code
- name: Run unit tests
run: go test ./...
- name: GoReleaser
- name: Build with Goreleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --snapshot --skip-publish --rm-dist
- name: Setup BATS framework
uses: mig4/setup-bats@master
with:
bats-version: 1.1.0
- name: kubectx (Go) integration tests
run: COMMAND=./dist/kubectx_linux_amd64/kubectx bats test/kubectx.bats
- name: kubens (Go) integration tests
run: COMMAND=./dist/kubens_linux_amd64/kubens bats test/kubens.bats

View File

@ -1,12 +0,0 @@
before_install:
- sudo add-apt-repository ppa:duggan/bats --yes
- sudo apt-get update -qq
- sudo apt-get install -qq bats
- sudo curl -fsSL -o /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v1.13.1/bin/linux/amd64/kubectl
- sudo chmod +x /usr/bin/kubectl
script:
- basename /usr/bin
- bats test/kubectx.bats
- bats test/kubens.bats
- shellcheck kubectx
- shellcheck kubens