Skip to content

Commit

Permalink
Upgrade to Cosmos SDK v0.50 (#18)
Browse files Browse the repository at this point in the history
# Summary
This PR upgrades this module to SDK v0.50.
  • Loading branch information
circle-smartin authored Oct 16, 2024
1 parent b16cee3 commit 38595d1
Show file tree
Hide file tree
Showing 298 changed files with 76,563 additions and 10,947 deletions.
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

0 comments on commit 38595d1

Please sign in to comment.