This repository has been archived by the owner on Dec 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from nspcc-dev/add-ci-github-actions
Add ci GitHub actions
- Loading branch information
Showing
5 changed files
with
45 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Go | ||
on: [push] | ||
jobs: | ||
|
||
test: | ||
name: test | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.11.x', '1.12.x', '1.13.x'] | ||
steps: | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v1 | ||
|
||
- name: Set GOPATH | ||
# temporary fix | ||
# see https://github.com/actions/setup-go/issues/14 | ||
run: | | ||
echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)" | ||
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin" | ||
shell: bash | ||
|
||
- name: Get dependencies | ||
run: | | ||
go get -u -v golang.org/x/lint/golint | ||
go mod tidy -v | ||
- name: Linter | ||
run: golint -set_exit_status ./... | ||
|
||
- name: Tests | ||
run: go test -coverprofile=coverage.txt -covermode=atomic ./... | ||
|
||
- name: Codecov | ||
run: bash <(curl -s https://codecov.io/bash) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters