Skip to content

Commit

Permalink
feat: Use github actions to run ut and e2e test (#76)
Browse files Browse the repository at this point in the history
Signed-off-by: Ce Gao <gaoce.gaoc@bytedance.com>
  • Loading branch information
Ce Gao committed Aug 28, 2020
1 parent 896d963 commit 9467671
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# This is a basic workflow to help you get started with Actions

name: CI

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
model-registry-unit-test:
runs-on:
#- self-hosted
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
id: go
- uses: actions/checkout@v2
with:
path: src/github.com/kleveross/klever-model-registry
- name: before_install
run: |
# get coveralls.io support
go get github.com/mattn/goveralls
# install kubebuilder
wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.1/kubebuilder_2.3.1_linux_amd64.tar.gz
tar -zxvf kubebuilder_2.3.1_linux_amd64.tar.gz
mv kubebuilder_2.3.1_linux_amd64 kubebuilder
sudo mv kubebuilder /usr/local
- name: install
run: |
make build
- name: script
run: |
GO_COVER_PROFILE=$(mktemp -u)
go test ./pkg/... -race -covermode atomic -coverprofile $GO_COVER_PROFILE
goveralls -service=travis-ci -coverprofile $GO_COVER_PROFILE

0 comments on commit 9467671

Please sign in to comment.