Skip to content

Commit

Permalink
add Go Actions
Browse files Browse the repository at this point in the history
This adds Github Actions as CI.
  • Loading branch information
shibumi committed Sep 6, 2020
1 parent 3641728 commit 8fe87a3
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on: [push, pull_request]
name: build
jobs:
build:
strategy:
matrix:
go-version: [1.13.x, 1.14.x, 1.15.x]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Format Unix
if: runner.os == 'Linux'
run: test -z $(go fmt ./...)
- name: Test
run: go test -covermode atomic -coverprofile='profile.cov' ./...
- name: Send coverage
if: runner.os == 'Linux'
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
GO111MODULE=off go get github.com/mattn/goveralls
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github

0 comments on commit 8fe87a3

Please sign in to comment.