diff options
author | xuri <xuri.me@gmail.com> | 2021-06-09 14:42:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 14:42:20 +0800 |
commit | 38162539b61b2b429b0498198ed58e1ef53d284b (patch) | |
tree | 0d523f354b013346fa34b2abcd63966d75ae958b /.github/workflows | |
parent | bafe087a61ca85b16fc69fda280f03eb2d7551dc (diff) |
Create go.yml
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/go.yml | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..13913aa --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,38 @@ +on: [push, pull_request] +name: build +jobs: + + test: + strategy: + matrix: + go-version: [1.15.x, 1.16.x] + os: [ubuntu-latest, macos-latest, windows-latest] + targetplatform: [x86, x64] + + runs-on: ${{ matrix.os }} + + steps: + + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Checkout code + uses: actions/checkout@v2 + + - name: Get dependencies + run: | + env GO111MODULE=on go vet ./... + - name: Build + run: go build -v . + + - name: Test + run: env GO111MODULE=on go test -v -race ./... -coverprofile=coverage.txt -covermode=atomic + + - name: Codecov + uses: codecov/codecov-action@v1 + with: + file: coverage.txt + flags: unittests + name: codecov-umbrella |