Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Mar 17, 2020
1 parent cb6bd1c commit bc5ea2a
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,43 @@
name: Go

on: [push, pull_request]

env:
GO11MODULE: on

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2-beta
with:
go-version: '^1.7'

- name: Check out code into the Go module directory
uses: actions/checkout@9a3a9ade
with:
submodules: true

- name: Clean up extra files
run: rm ./testcases/*.go

- name: Run golangci-lint
uses: actions-contrib/golangci-lint@v1
with:
golangci_lint_version: 'v1.23.6'

- name: Test
run: go test -race -v ./...

- name: Generate coverage
run: go test -covermode=count -coverprofile=profile.cov

- name: Send coverage
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 bc5ea2a

Please sign in to comment.