Skip to content

Commit

Permalink
run unit tests in github action
Browse files Browse the repository at this point in the history
  • Loading branch information
cppforlife committed Aug 20, 2019
1 parent 7bccb35 commit 6e8dff8
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/test-gh.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: test-gh
on: [push]
jobs:
test-all:
name: Test GH
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.12
uses: actions/setup-go@v1
with:
go-version: 1.12
- name: Check out code into the Go module directory
uses: actions/checkout@v1
with:
path: src/github.com/k14s/kapp
- name: Run Tests
run: |
set -e -x
export GOPATH=$(echo `pwd`/../../../../)
# install ytt for build
wget -O- https://k14s.io/install.sh | bash
./hack/build.sh
./hack/test.sh
# TODO no e2e since there is no k8s env
8 changes: 6 additions & 2 deletions hack/test.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/bash

set -e -x -u
set -e -x

go clean -testcache
if [ -z "$GITHUB_ACTION" ]; then
go clean -testcache
fi

set -u

go test ./pkg/... -test.v $@

Expand Down

0 comments on commit 6e8dff8

Please sign in to comment.