2021-06-09 14:42:20 +08:00
|
|
|
on: [push, pull_request]
|
|
|
|
name: build
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
test:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2021-08-22 13:36:56 +08:00
|
|
|
go-version: [1.15.x, 1.16.x, 1.17.x]
|
2021-06-09 14:42:20 +08:00
|
|
|
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
|
2021-09-17 00:15:51 +08:00
|
|
|
run: env GO111MODULE=on go test -v -timeout 30m -race ./... -coverprofile=coverage.txt -covermode=atomic
|
2021-06-09 14:42:20 +08:00
|
|
|
|
|
|
|
- name: Codecov
|
2021-10-15 21:45:46 +08:00
|
|
|
uses: codecov/codecov-action@v2
|
2021-06-09 14:42:20 +08:00
|
|
|
with:
|
|
|
|
file: coverage.txt
|
|
|
|
flags: unittests
|
|
|
|
name: codecov-umbrella
|