Skip to content

Commit

Permalink
Move coverage to an individual build step.
Browse files Browse the repository at this point in the history
  • Loading branch information
robshakir committed May 24, 2022
1 parent f6d13aa commit 13673a3
Showing 1 changed file with 34 additions and 6 deletions.
40 changes: 34 additions & 6 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
schedule:
- cron: "0 0 * * *"

jobs:
build:
name: Build
Expand Down Expand Up @@ -35,11 +35,6 @@ jobs:
- name: Test
run: go test -v -coverprofile=profile.cov ./...

- name: Submit coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
Expand Down Expand Up @@ -67,3 +62,36 @@ jobs:
- name: Staticcheck
run: |
staticcheck ./...
coverage:
name: Submit coverage
runs-on: ubuntu-latest

steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.x'
id: go

- name: Install required static analysis tools
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Check out code
uses: actions/checkout@v2

- name: Go vet
run: go vet -composites=false ./...

- name: Check gofmt
run: diff -u <(echo -n) <(gofmt -d -s .)

- name: Staticcheck
run: |
staticcheck ./...
- name: Submit coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: profile.cov

0 comments on commit 13673a3

Please sign in to comment.