2019-09-08 14:50:30 +03:00
|
|
|
name: main
|
|
|
|
on:
|
|
|
|
- push
|
2019-09-11 09:35:50 +03:00
|
|
|
- pull_request
|
2019-09-08 14:50:30 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Setup Go
|
|
|
|
uses: actions/setup-go@v1
|
|
|
|
with:
|
2022-10-29 05:20:10 +03:00
|
|
|
go-version: 1.15
|
2019-09-08 14:50:30 +03:00
|
|
|
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
|
2020-03-06 00:26:04 +03:00
|
|
|
uses: codecov/codecov-action@v1.0.6
|
2019-09-08 14:50:30 +03:00
|
|
|
with:
|
|
|
|
token: ${{secrets.CODECOV_TOKEN}}
|
|
|
|
file: ./coverage.txt
|
|
|
|
|