Skip to content

Commit

Permalink
Add build and codecov Github action (hyperledger#8)
Browse files Browse the repository at this point in the history
* Create go.yml

* Update go.yml

* Update go.yml

* Update go.yml

* Create codecov.yml

* Update codecov.yml

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
  • Loading branch information
peterbroadhurst authored May 14, 2021
1 parent ed6da73 commit 2a9ef55
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

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: Build
run: go build -v ./...

- name: Test
run: go test -coverprofile=coverage.txt -covermode=atomic ./...

- name: Upload coverage
run: bash <(curl -s https://codecov.io/bash)
10 changes: 10 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
coverage:
status:
project:
default:
threshold: 0.1%
patch:
default:
threshold: 0.1%
ignore:
- "mocks/**/*.go"

0 comments on commit 2a9ef55

Please sign in to comment.