Skip to content

Commit

Permalink
Update GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bombsimon committed May 11, 2021
1 parent 7983fbe commit 2b2038c
Showing 1 changed file with 11 additions and 19 deletions.
30 changes: 11 additions & 19 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,27 @@
on:
- push
- pull_request

name: Test, lint and coverage

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.13.x

- name: Checkout code
uses: actions/checkout@v1

- name: Install golangci-lint
run: |
go get github.com/golangci/golangci-lint/cmd/golangci-lint
uses: actions/checkout@v2

- name: Run linters
run: |
export PATH=$PATH:$(go env GOPATH)/bin
golangci-lint run
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.40

test:
strategy:
matrix:
go-version:
- 1.13.x
- 1.15.x
- 1.16.x
platform:
- ubuntu-latest
- macos-latest
Expand All @@ -46,7 +38,7 @@ jobs:
uses: actions/checkout@v1

- name: Run tests
run: go test -v -covermode=count
run: go test -v -covermode=count

coverage:
runs-on: ubuntu-latest
Expand All @@ -60,9 +52,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v1

- name: Calc coverage
- name: Calc coverage
run: |
export PATH=$PATH:$(go env GOPATH)/bin
export PATH=$PATH:$(go env GOPATH)/bin
go test -v -covermode=count -coverprofile=coverage.out
- name: Convert coverage to lcov
Expand Down

0 comments on commit 2b2038c

Please sign in to comment.