forked from zenthangplus/goccm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using github workflow instead of travis
- Loading branch information
1 parent
76d9bd2
commit ea06bcf
Showing
3 changed files
with
63 additions
and
17 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,62 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
name: run tests | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run linters | ||
uses: golangci/golangci-lint-action@v2 | ||
with: | ||
version: v1.46.2 | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
go-version: [ 1.10.x, 1.12.x, 1.13.x, 1.14.x, 1.16.x, 1.17.x, 1.18.x ] | ||
platform: [ ubuntu-latest ] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Run tests | ||
run: go test -v -covermode=count | ||
|
||
coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go | ||
if: success() | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.14.x | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Calculate coverage | ||
run: | | ||
go test -v -covermode=atomic -coverprofile=coverage.txt | ||
- name: Upload coverage report | ||
uses: codecov/[email protected] | ||
with: | ||
token: ${{ secrets.CODECOV_ACCESS_TOKEN }} | ||
file: ./coverage.txt | ||
flags: unittests | ||
name: codecov-umbrella |
This file was deleted.
Oops, something went wrong.
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