-
Notifications
You must be signed in to change notification settings - Fork 176
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 #421 from zeeke/code-coverage
Add Coveralls step in GH actions
- Loading branch information
Showing
5 changed files
with
47 additions
and
11 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 |
---|---|---|
|
@@ -23,6 +23,7 @@ jobs: | |
GOARCH: ${{ matrix.goarch }} | ||
GOOS: ${{ matrix.goos }} | ||
run: make build | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
|
@@ -42,16 +43,45 @@ jobs: | |
- name: Go test | ||
run: make test | ||
|
||
test-coverage: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
name: test-coverage | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.16.x | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Install hwdata | ||
run: sudo apt-get install hwdata -y | ||
|
||
- name: Go test with coverage | ||
run: make test-coverage | ||
|
||
- name: Coveralls | ||
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: test/coverage/lcov.info | ||
|
||
golangci: | ||
name: Golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v1 | ||
with: | ||
go-version: 1.16.x | ||
- uses: actions/checkout@v2 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v2 | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. | ||
version: v1.37 | ||
|
||
shellcheck: | ||
name: Shellcheck | ||
runs-on: ubuntu-latest | ||
|
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
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