-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add testv cov action #5
Merged
Merged
Changes from 8 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c3a2fd4
add testv cov action
PrathyushaLakkireddy 83aac01
add badges
PrathyushaLakkireddy 7f1714f
add secret key of code cov
PrathyushaLakkireddy 27fed99
Merge branch 'main' of https://github.com/allinbits/sdk-service into …
PrathyushaLakkireddy 663a16b
update test.yml
PrathyushaLakkireddy 78ccaec
update lint
PrathyushaLakkireddy d964c93
update build.yml
PrathyushaLakkireddy 844e7ff
remove build.yml
PrathyushaLakkireddy e13590e
add lint command
PrathyushaLakkireddy e67cf94
add golangci.yml
PrathyushaLakkireddy b1de992
Merge branch 'main' of https://github.com/emerishq/sdk-service into p…
PrathyushaLakkireddy fe87f7d
fix lint
PrathyushaLakkireddy e83c9c9
add juno chainnanme const
PrathyushaLakkireddy e25faff
fix lint
PrathyushaLakkireddy cd262e5
remove redeclare import
PrathyushaLakkireddy 3991540
Merge branch 'main' into prathyusha/code_cov_action
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: 20% | ||
|
||
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,50 @@ | ||
name: Lint | ||
on: | ||
pull_request: | ||
permissions: | ||
contents: read | ||
env: | ||
GOPRIVATE: "github.com/allinbits/*" | ||
|
||
jobs: | ||
setup-matrix: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup matrix combinations | ||
id: setup-matrix-combinations | ||
run: | | ||
MATRIX_PARAMS_COMBINATIONS="$(make versions-json)" | ||
echo ::set-output name=matrix-combinations::{\"include\":$MATRIX_PARAMS_COMBINATIONS} | ||
outputs: | ||
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }} | ||
|
||
golangci: | ||
name: lint | ||
runs-on: self-hosted | ||
needs: setup-matrix | ||
strategy: | ||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }} | ||
timeout-minutes: 10 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.17 | ||
|
||
- name: Configure git for private modules | ||
env: | ||
GIT_TOKEN: ${{ secrets.TENDERBOT_GIT_TOKEN }} | ||
run: git config --global url."https://git:${GIT_TOKEN}@github.com".insteadOf "https://github.com" | ||
|
||
- name: Setup multisdk | ||
run: make setup-${{ matrix.versions }} | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.43 | ||
args: --timeout 10m --build-tags sdk_${{ matrix.versions }} | ||
github-token: ${{ secrets.TENDERBOT_GIT_TOKEN }} |
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,55 @@ | ||
name: Tests | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
push: | ||
|
||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
jobs: | ||
setup-matrix: | ||
runs-on: self-hosted | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup matrix combinations | ||
id: setup-matrix-combinations | ||
run: | | ||
MATRIX_PARAMS_COMBINATIONS="$(make versions-json)" | ||
echo ::set-output name=matrix-combinations::{\"include\":$MATRIX_PARAMS_COMBINATIONS} | ||
outputs: | ||
matrix-combinations: ${{ steps.setup-matrix-combinations.outputs.matrix-combinations }} | ||
|
||
code_cov: | ||
runs-on: self-hosted | ||
needs: setup-matrix | ||
strategy: | ||
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix-combinations) }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- 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/* | ||
go env -w GOPROXY=direct | ||
git config --global url."https://git:${{ secrets.TENDERBOT_GIT_TOKEN }}@github.com".insteadOf "https://github.com" | ||
- name: Setup multisdk | ||
run: make setup-${{ matrix.versions }} | ||
|
||
- name: Run Tests | ||
run: make test-${{ matrix.versions }} | ||
|
||
- name: Run coverage | ||
run: make coverage-${{ matrix.versions }} | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v2 | ||
with: | ||
file: coverage.out |
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,6 @@ | ||
# sdk-service | ||
|
||
[![codecov](https://codecov.io/gh/allinbits/sdk-service/branch/main/graph/badge.svg?token=AXDASRALWG)](https://codecov.io/gh/allinbits/sdk-service) | ||
[![Build status](https://github.com/allinbits/sdk-service/workflows/Build/badge.svg)](https://github.com/allinbits/sdk-service/commits/main) | ||
[![Tests status](https://github.com/allinbits/sdk-service/workflows/Tests/badge.svg)](https://github.com/allinbits/sdk-service/commits/main) | ||
[![Lint](https://github.com/allinbits/sdk-service/workflows/Lint/badge.svg?token)](https://github.com/allinbits/sdk-service/commits/main) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the lint seems to be failing, also make target for lint is missing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, Lint is failing bcz of some unused code.
Error:
transferMsgType
is unused in v42/v44. So shall I remove/comment it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure it's not being used in either of the versions, it gets tricky in this repo with build flags.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code which has used it was commented, but not transferMsgType var.