CI: split coverage and lint and try to fix coverage (#4)

pull/4881/head
Brett Jones 4 years ago committed by GitHub
parent fc60b04ab5
commit eef4bd18ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      .github/workflows/go_test.yaml

@ -7,34 +7,44 @@ on:
branches: [ master ]
jobs:
build:
name: go test
lint:
name: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.16']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- uses: actions/checkout@v2
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.32
args: --timeout=5m
- name: Test
run: go test -v -coverprofile=.coverprofile .
args: --timeout=2m
- name: Report coveralls.io
test:
name: test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go: ['1.16']
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
id: go
- uses: actions/checkout@v2
- name: Run tests
run: go test -v -coverprofile=profile.cov ./...
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: .coverprofile
path-to-profile: profile.cov
flag-name: Go-${{ matrix.go }}

Loading…
Cancel
Save