33 lines
762 B
YAML
33 lines
762 B
YAML
|
name: main
|
||
|
on:
|
||
|
- push
|
||
|
jobs:
|
||
|
build:
|
||
|
name: Build
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Setup Go
|
||
|
uses: actions/setup-go@v1
|
||
|
with:
|
||
|
go-version: 1.13
|
||
|
id: go
|
||
|
- name: Code checkout
|
||
|
uses: actions/checkout@v1
|
||
|
- name: Test
|
||
|
run: |
|
||
|
go test -v ./... -coverprofile=coverage.txt -covermode=atomic
|
||
|
go test -v ./... -race
|
||
|
- name: Build
|
||
|
run: |
|
||
|
GOOS=linux go build
|
||
|
GOOS=darwin go build
|
||
|
GOOS=freebsd go build
|
||
|
GOOS=windows go build
|
||
|
GOARCH=386 go build
|
||
|
- name: Publish coverage
|
||
|
uses: codecov/codecov-action@v1.0.0
|
||
|
with:
|
||
|
token: ${{secrets.CODECOV_TOKEN}}
|
||
|
file: ./coverage.txt
|
||
|
|