Skip to content

Commit

Permalink
Merge pull request #2 from adityasaky/add-github-actions
Browse files Browse the repository at this point in the history
Add GitHub Actions
  • Loading branch information
adityasaky authored Sep 10, 2021
2 parents 56d56ee + 039d5dd commit d68b968
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:
test:
strategy:
matrix:
go-version: [1.16.x, 1.17.x]
os: [ubuntu-latest, macos-latest, windows-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 d68b968

Please sign in to comment.