-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 3efce91
Showing
46 changed files
with
10,131 additions
and
0 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,5 @@ | ||
<h1 style="text-align: center">Noble's Authority Module</h1> | ||
|
||
[](https://codecov.io/gh/noble-assets/authority) | ||
|
||
This repository includes the `x/authority` Cosmos SDK module implementation. |
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,3 @@ | ||
parsers: | ||
go: | ||
partials_as_hits: true |
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,25 @@ | ||
name: Unit Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
|
||
- name: Run Tests | ||
run: make test-unit | ||
|
||
- name: Upload Coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_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,2 @@ | ||
.idea | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
.PHONY: proto-format proto-lint proto-gen format lint test-unit | ||
all: proto-all format lint test | ||
|
||
############################################################################### | ||
### Formatting & Linting ### | ||
############################################################################### | ||
|
||
gofumpt_cmd=mvdan.cc/gofumpt | ||
golangci_lint_cmd=github.com/golangci/golangci-lint/cmd/golangci-lint | ||
|
||
format: | ||
@echo "π€ Running formatter..." | ||
@go run $(gofumpt_cmd) -l -w . | ||
@echo "β Completed formatting!" | ||
|
||
lint: | ||
@echo "π€ Running linter..." | ||
@go run $(golangci_lint_cmd) run --timeout=10m | ||
@echo "β Completed linting!" | ||
|
||
############################################################################### | ||
### Protobuf ### | ||
############################################################################### | ||
|
||
BUF_VERSION=1.31.0 | ||
BUILDER_VERSION=0.14.0 | ||
|
||
proto-all: proto-format proto-lint proto-gen | ||
|
||
proto-format: | ||
@echo "π€ Running protobuf formatter..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
bufbuild/buf:$(BUF_VERSION) format --diff --write | ||
@echo "β Completed protobuf formatting!" | ||
|
||
proto-gen: | ||
@echo "π€ Generating code from protobuf..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
ghcr.io/cosmos/proto-builder:$(BUILDER_VERSION) sh ./proto/generate.sh | ||
@echo "β Completed code generation!" | ||
|
||
proto-lint: | ||
@echo "π€ Running protobuf linter..." | ||
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \ | ||
bufbuild/buf:$(BUF_VERSION) lint | ||
@echo "β Completed protobuf linting!" | ||
|
||
############################################################################### | ||
### Testing ### | ||
############################################################################### | ||
|
||
test: test-unit | ||
|
||
test-unit: | ||
@echo "π€ Running unit tests..." | ||
@go test -cover -coverprofile=coverage.out -race -v ./x/authority/keeper/... | ||
@echo "β Completed unit tests!" |
Oops, something went wrong.