diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..55e869b --- /dev/null +++ b/.github/workflows/go.yml @@ -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 ./... diff --git a/politeia/readasset.go b/politeia/readasset.go index 939abbe..6fcbd15 100644 --- a/politeia/readasset.go +++ b/politeia/readasset.go @@ -10,7 +10,7 @@ import ( ) var assets = map[string][]byte{ - "sample-politeiavoter.conf": []byte(sampleconfig.FileContents), + "sample-politeiavoter.conf": []byte(sampleconfig.FileContents), } func main() {