-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add code cov action * remove codecov.yml * comment config test * add badges * add codeccov yml * add secret key of code cov * update code cov threshold
- Loading branch information
1 parent
0cadfea
commit ee8ea31
Showing
6 changed files
with
81 additions
and
8 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,24 @@ | ||
# | ||
# This codecov.yml is the default configuration for | ||
# all repositories on Codecov. You may adjust the settings | ||
# below in your own codecov.yml in your repository. | ||
# | ||
coverage: | ||
precision: 2 | ||
round: down | ||
range: 70...100 | ||
|
||
status: | ||
# Learn more at https://codecov.io/docs#yaml_default_commit_status | ||
status: #Code coverage status will be posted to pull requests based on targets defined below. | ||
diff: #diff coverage is code coverage only for the lines changed in a pull request. | ||
target: 45% | ||
|
||
project: | ||
default: | ||
threshold: 1% # allow this much decrease on project | ||
changes: false | ||
|
||
comment: | ||
layout: "header, diff, flags" | ||
behavior: default # update if exists else create new |
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,26 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Setup token for pulling from allinbits private repos | ||
run: | | ||
go env -w GOPRIVATE=github.com/allinbits/* | ||
git config --global url."https://git:${{ secrets.TENDERBOT_GIT_TOKEN }}@github.com".insteadOf "https://github.com" | ||
- name: Build | ||
run: go build -v ./... |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: golangci-lint | ||
name: Lint | ||
on: | ||
pull_request: | ||
push: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
test: | ||
go test -v -race ./... -cover | ||
|
||
lint: | ||
golangci-lint run ./... | ||
|
||
build: | ||
go build ./... |
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,6 @@ | ||
# Emeris-utils | ||
|
||
[![codecov](https://codecov.io/gh/allinbits/emeris-utils/branch/main/graph/badge.svg?token=8MZNYVSKK9)](https://codecov.io/gh/allinbits/emeris-utils) | ||
[![Build status](https://github.com/allinbits/emeris-utils/workflows/Build/badge.svg)](https://github.com/allinbits/emeris-utils/commits/main) | ||
[![Tests status](https://github.com/allinbits/emeris-utils/workflows/Tests/badge.svg)](https://github.com/allinbits/emeris-utils/commits/main) | ||
[![Lint](https://github.com/allinbits/emeris-utils/workflows/Lint/badge.svg?token)](https://github.com/allinbits/emeris-utils/commits/main) |