From e0c8bbb526b418ef2da9f2e91d768195467e066b Mon Sep 17 00:00:00 2001 From: pei Date: Wed, 25 Sep 2019 10:05:46 +0900 Subject: [PATCH] chore: use github action (#528) * use github action --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..c34dea456 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,24 @@ +on: push +jobs: + test: + strategy: + matrix: + go: [ '1.10.x', '1.11.x', '1.12.x' ] + platform: [ubuntu-latest, macos-latest] + runs-on: ${{ matrix.platform }} + steps: + - uses: actions/checkout@master + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go }} + - name: deps + run: make deps + - name: static program analysis + run: | + export PATH=$PATH:$(go env GOPATH)/bin # https://github.com/actions/setup-go/issues/14 + make fmt-check lint vet + - name: build + run: make build + - name: test + run: make test diff --git a/Makefile b/Makefile index b6976ec76..75f950268 100644 --- a/Makefile +++ b/Makefile @@ -59,7 +59,7 @@ deps: .PHONY: devel-deps devel-deps: - GO111MODULE=off $(GOGET) -v ${u} \ + GO111MODULE=off $(GOGET) -v -u \ golang.org/x/lint/golint \ github.com/swaggo/swag/cmd/swag \ github.com/swaggo/swag/gen