Add CodeCov to GitHub Actions
This commit is contained in:
parent
b1c6611b55
commit
5e7d773e1b
2 changed files with 34 additions and 12 deletions
15
.github/workflows/build.yml
vendored
15
.github/workflows/build.yml
vendored
|
@ -17,21 +17,12 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.15
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: go get -u golang.org/x/lint/golint
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go build -v ./...
|
run: go build -v ./...
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test -v ./...
|
run: go test -v ./... -covermode=count -coverprofile=cover.out
|
||||||
|
|
||||||
- name: Vet & Lint
|
- uses: codecov/codecov-action@v1
|
||||||
run: |
|
|
||||||
go vet ./...
|
|
||||||
golint ./...
|
|
||||||
|
|
||||||
- name: golangci-lint
|
|
||||||
uses: golangci/golangci-lint-action@v2
|
|
||||||
with:
|
with:
|
||||||
version: v1.35.2
|
flags: unittests
|
||||||
|
|
31
.github/workflows/lint.yml
vendored
Normal file
31
.github/workflows/lint.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: lint
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ main ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ main ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.15
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: go get -u golang.org/x/lint/golint
|
||||||
|
|
||||||
|
- name: Vet & Lint
|
||||||
|
run: |
|
||||||
|
go vet ./...
|
||||||
|
golint ./...
|
||||||
|
|
||||||
|
- name: golangci-lint
|
||||||
|
uses: golangci/golangci-lint-action@v2
|
||||||
|
with:
|
||||||
|
version: v1.35.2
|
Loading…
Reference in a new issue