Skip to content

Commit 8eb9888

Browse files
committed
Switch to github actions for better cross platform testing
Signed-off-by: Davanum Srinivas <[email protected]>
1 parent 6496210 commit 8eb9888

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed

.github/workflows/test.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-versions: [1.12.x, 1.13.x, 1.14.x]
8+
platform: [ubuntu-latest, macos-latest]
9+
runs-on: ${{ matrix.platform }}
10+
steps:
11+
- name: Install Go
12+
uses: actions/setup-go@v1
13+
with:
14+
go-version: ${{ matrix.go-version }}
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
- name: Test
18+
run: |
19+
make test
20+
lint:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Install Go
24+
uses: actions/setup-go@v1
25+
- name: Checkout code
26+
uses: actions/checkout@v2
27+
- name: Lint
28+
run: |
29+
docker run --rm -v `pwd`:/go/src/k8s.io/klog -w /go/src/k8s.io/klog \
30+
golangci/golangci-lint:v1.23.8 golangci-lint run --disable-all -v \
31+
-E govet -E misspell -E gofmt -E ineffassign -E golint

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
# limitations under the License.
1414

1515
.PHONY: verify
16-
verify: verify-fmt verify-lint vet
16+
verify: verify-fmt verify-lint vet test
17+
18+
.PHONY: test
19+
test:
1720
GO111MODULE=on go test -v -race ./...
1821

1922
.PHONY: verify-fmt

0 commit comments

Comments
 (0)