Skip to content

Commit

Permalink
update github action config
Browse files Browse the repository at this point in the history
  • Loading branch information
silenceper committed Feb 8, 2021
1 parent 3a46a61 commit b52ad32
Showing 1 changed file with 29 additions and 26 deletions.
55 changes: 29 additions & 26 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,35 @@
name: Go
on: [push]
jobs:

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
golangci:
strategy:
matrix:
go-version: [1.15.x]
name: golangci-lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.31
build:
name: Build
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.13
id: go
- name: Test
run: go test -v -race ./...

- 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: Run golangci-lint
uses: golangci/[email protected]
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.26
- name: Test
run: go test -coverprofile=coverage.txt -covermode=atomic -race ./...
- name: Upload Coverage report to CodeCov
uses: codecov/codecov-action@v1
with:
token: ${{secrets.CODECOV_TOKEN}}
file: ./coverage.txt
- name: Build
run: go build -v .

0 comments on commit b52ad32

Please sign in to comment.