Skip to content

Commit

Permalink
Add dedicated formatting step
Browse files Browse the repository at this point in the history
Makes it more visible in PRs why certain checks failed
  • Loading branch information
ccremer committed May 17, 2020
1 parent 52d9b4e commit d1a9059
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,17 @@ jobs:
prefix: ${{ github.event.repository.name }}
coverageLocations:
"${{github.workspace}}/c.out:gocov"

formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-go@v2
with:
go-version: ${{ env.GO_VERSION }}
- uses: actions/cache@v1
with:
path: /home/runner/go/pkg/mod
key: go-mod-build
- name: Verify if Code needs formatting
run: make fmt
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dist: fmt
clean:
@rm -rf fronius-exporter c.out dist

test: fmt
test:
@go test -coverprofile c.out ./...

run:
Expand Down

0 comments on commit d1a9059

Please sign in to comment.