Skip to content

Commit

Permalink
add build and test github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ssalvatori committed Jan 2, 2021
1 parent 842b2f6 commit 8c50157
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 5 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/coverall.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Go

on: ["push", "pull_request"]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: '1.15.6'

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
31 changes: 31 additions & 0 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Go

on: ["push", "pull_request"]

jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: '1.15.6'

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ name: Lint Go Code
on:
push:
branches:
- master
- "*"

jobs:
lint:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
stable: 'false'
go-version: '1.15.6'
stable: "false"
go-version: "1.15.6"

- name: Lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.34.1
golangci-lint run
golangci-lint run

0 comments on commit 8c50157

Please sign in to comment.