2020-04-10 22:50:29 +02:00
|
|
|
name: build
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths-ignore:
|
|
|
|
- '*.md'
|
2019-09-06 06:08:29 +02:00
|
|
|
jobs:
|
2020-04-10 22:35:55 +02:00
|
|
|
build:
|
|
|
|
name: Build
|
2019-09-06 06:08:29 +02:00
|
|
|
runs-on: ubuntu-latest
|
2020-04-10 22:50:29 +02:00
|
|
|
timeout-minutes: 5
|
2019-09-06 06:08:29 +02:00
|
|
|
steps:
|
2020-09-28 02:39:42 +02:00
|
|
|
- name: Set up Go 1.15
|
2021-01-19 05:28:33 +01:00
|
|
|
uses: actions/setup-go@v2
|
2019-09-09 03:30:21 +02:00
|
|
|
with:
|
2020-09-28 02:39:42 +02:00
|
|
|
go-version: 1.15
|
2019-09-09 03:30:21 +02:00
|
|
|
- name: Check out code into the Go module directory
|
2020-09-28 02:39:42 +02:00
|
|
|
uses: actions/checkout@v2
|
2020-04-10 22:50:29 +02:00
|
|
|
- name: Build binary to make sure it works
|
2019-09-09 03:30:21 +02:00
|
|
|
run: go build -mod vendor
|
2021-01-19 05:34:16 +01:00
|
|
|
- run: go version && which go
|
|
|
|
- run: sudo go version && sudo which go
|
2020-04-10 22:50:29 +02:00
|
|
|
- name: Test
|
2021-01-19 05:34:16 +01:00
|
|
|
run: sudo go test -mod vendor ./... -race -coverprofile=coverage.txt -covermode=atomic
|
2020-10-22 05:05:11 +02:00
|
|
|
- name: Codecov
|
|
|
|
uses: codecov/codecov-action@v1.0.14
|
|
|
|
with:
|
|
|
|
file: ./coverage.txt
|