Skip to content

Commit

Permalink
Added linter to github action. (#30)
Browse files Browse the repository at this point in the history
* Added linter github action

* changed linter, updated setup-go version and removed unnecessary code

* added condition: on pull_request
  • Loading branch information
pavan-kalyan authored and rodrigo-brito committed Oct 6, 2019
1 parent f4e185f commit 45db637
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
name: Go
on: [push]
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:

build:
name: GoCity CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-go@v1
with:
version: '1.12'
- run: go test -race -cover ./...
- name: Set up Go 1.13
uses: actions/setup-go@v1
with:
go-version: 1.13

- name: Check out code into the Go module directory
uses: actions/checkout@v1
with:
fetch-depth: 1
path: go/src/github.com/user/gocity

- name: GolangCI-Lint
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.19.1
./bin/golangci-lint --issues-exit-code 0 run
env:
GOPATH: /home/runner/work/gocity/go
- name: Test
run: |
go test -race -cover ./...
env:
GOPATH: /home/runner/work/gocity/go

0 comments on commit 45db637

Please sign in to comment.