From bfd4a2480479ff9ab69520b2bd3ea3b1827b1078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=97=AD?= <120582243@qq.com> Date: Mon, 23 Sep 2019 21:07:25 +0800 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..a5455a4 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,37 @@ +name: CI +on: [push,pull_request] +jobs: + lint: + name: Lint + runs-on: ubuntu-18.04 + steps: + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - name: Code + uses: actions/checkout@v1 + - name: Intsall Golangci-lint + run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b . latest + - name: Lint + run: ./golangci-lint run ./... + + test: + name: Unit Testing + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-18.04] + steps: + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12 + id: go + - name: Code + uses: actions/checkout@v1 + - name: Go Get dependencies + run: go get -v -t -d ./... + - name: Go Test + run: go test -v ./...