Skip to content

Commit

Permalink
build: add ci via github actions (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
dajohi authored Aug 27, 2020
1 parent 033180d commit 8e93c39
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Test
on: [push, pull_request]
jobs:
build:
name: Go CI
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.14, 1.15]
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Check out source
uses: actions/checkout@v2
- name: Install linters
run: "curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.30.0"
- name: Build
env:
GO111MODULE: "on"
run: go build ./...
- name: Lint
env:
GO111MODULE: "on"
run: |
golangci-lint run --disable-all --deadline=10m --enable=gofmt --enable=govet --enable=gosimple --enable=unconvert --enable=ineffassign
- name: Test
env:
GO111MODULE: "on"
run: go test -v ./...
2 changes: 1 addition & 1 deletion politeia/readasset.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

var assets = map[string][]byte{
"sample-politeiavoter.conf": []byte(sampleconfig.FileContents),
"sample-politeiavoter.conf": []byte(sampleconfig.FileContents),
}

func main() {
Expand Down

0 comments on commit 8e93c39

Please sign in to comment.