Skip to content

Commit

Permalink
✨ github actions support
Browse files Browse the repository at this point in the history
  • Loading branch information
lawzava committed Jan 23, 2021
1 parent b6d286a commit 24619af
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 24 deletions.
24 changes: 0 additions & 24 deletions .github/workflows/go.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/golang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Golang
on: [push]
env:
GO111MODULE: on
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Setup Go for use with actions
uses: actions/setup-go@v2
with:
go-version: 1.15
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run tests
run: go test -race -covermode atomic -coverprofile=covprofile ./...
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: goveralls -coverprofile=covprofile
13 changes: 13 additions & 0 deletions .github/workflows/golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: golangci
on: [push]
env:
GO111MODULE: on
jobs:
golangci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
with:
version: v1.35

0 comments on commit 24619af

Please sign in to comment.