add CI workflow

Signed-off-by: 天元 <jianbo.sjb@alibaba-inc.com>
This commit is contained in:
天元
2020-07-17 13:58:31 +08:00
parent 8ae7a0ea45
commit 05122b30a9
2 changed files with 57 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Go
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Get dependencies
run: |
go get -v -t -d ./...
- name: Run Make
run: make
- name: Run Make test
run: make test
- name: Install ginkgo
run: |
sudo apt-get update
sudo apt-get install -y golang-ginkgo-dev
- name: Setup Kind Cluster
uses: engineerd/setup-kind@v0.4.0
with:
version: "v0.7.0"
- name: Run e2e tests
run: |
make e2e-setup
make e2e-test
make e2e-cleanup
+10
View File
@@ -20,6 +20,7 @@ test: generate fmt vet manifests
# Build manager binary
manager: generate fmt vet
go build -o bin/manager cmd/server/main.go
go build -o bin/rudrx cmd/rudrx/main.go
# Run against the configured Kubernetes cluster in ~/.kube/config
run: generate fmt vet manifests
@@ -78,3 +79,12 @@ CONTROLLER_GEN=$(GOBIN)/controller-gen
else
CONTROLLER_GEN=$(shell which controller-gen)
endif
e2e-setup:
# install oam-k8s-runtime
e2e-test:
# Run e2e test
e2e-cleanup:
# Clean up