Skip to content
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

Upgrade to Cosmos SDK v0.50 #18

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .covignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.pb.go
.pb.gw.go
/x/cctp/simulation
/x/cctp/client/cli
module_simulation.go
module.go
18 changes: 18 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright 2024 Circle Internet Group, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0

name: Unit Tests

on:
Expand Down Expand Up @@ -27,6 +43,8 @@ jobs:
needs: unit-tests
if: github.event_name == 'pull_request'
uses: circlefin/circle-public-github-workflows/.github/workflows/pr-scan.yaml@v1
with:
allow-reciprocal-licenses: false

release-sbom:
needs: unit-tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea

coverage.out
coverage.html
5 changes: 5 additions & 0 deletions .licenseignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
pkg:golang/github.com/hashicorp/go-plugin
pkg:golang/github.com/hashicorp/golang-lru
pkg:golang/github.com/hashicorp/golang-lru/v2
pkg:golang/github.com/hashicorp/yamux
pkg:golang/pgregory.net/rapid
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: proto-setup proto-format proto-lint proto-gen format lint test
.PHONY: proto-format proto-lint proto-gen format lint test
all: proto-all format lint test

###############################################################################
Expand All @@ -22,7 +22,8 @@ lint:
### Protobuf ###
###############################################################################

BUF_VERSION=1.27.1
BUF_VERSION=1.34.0
BUILDER_VERSION=0.14.0

proto-all: proto-format proto-lint proto-gen

Expand All @@ -35,7 +36,7 @@ proto-format:
proto-gen:
@echo "🤖 Generating code from protobuf..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
noble-cctp-proto sh ./proto/generate.sh
ghcr.io/cosmos/proto-builder:$(BUILDER_VERSION) sh ./proto/generate.sh
@echo "✅ Completed code generation!"

proto-lint:
Expand All @@ -44,16 +45,16 @@ proto-lint:
bufbuild/buf:$(BUF_VERSION) lint
@echo "✅ Completed protobuf linting!"

proto-setup:
@echo "🤖 Setting up protobuf environment..."
@docker build --rm --tag noble-cctp-proto:latest --file proto/Dockerfile .
@echo "✅ Setup protobuf environment!"

###############################################################################
### Testing ###
###############################################################################

test:
@echo "🤖 Running tests..."
@go test -cover -race -v ./x/...
@go test -coverprofile=coverage.out -race ./x/...
@echo "✅ Completed tests!"
@grep -v -f .covignore coverage.out > coverage.filtered.out && rm coverage.out
@echo "\n📝 Detailed coverage report, excluding files in .covignore:"
@go tool cover -func coverage.filtered.out
@go tool cover -html coverage.filtered.out -o coverage.html && rm coverage.filtered.out
@echo "\n📝 Produced html coverage report at coverage.html, excluding files in .covignore"
Loading
Loading