-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) · 1.01 KB
/
jsonstream_test.yml
File metadata and controls
37 lines (29 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: JSONStream Test
on: [push, pull_request]
jobs:
test:
name: Test Linux
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Set up GolangCI-Lint
run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- latest
- name: Lint
run: ./bin/golangci-lint run ./...
- name: Test
run: go test -v -covermode=atomic -coverpkg=./... -coverprofile coverage.tmp ./...
- name: Test Coverage Check
run: |
COV=$(go tool cover -func=coverage.tmp | grep -e '^total:\s*(statements)' | awk '{ print $3 }')
test $COV = '100.0%' || (echo "Expected 100% test coverage, got $COV" && exit 1)
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-profile: coverage.tmp