Skip to content

Commit

Permalink
chore: init
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Jun 7, 2024
0 parents commit 4d55102
Show file tree
Hide file tree
Showing 53 changed files with 11,839 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
![](./banner.png)

<h1 style="text-align: center">Monerium's EURe on Noble</h1>

[![codecov](https://img.shields.io/codecov/c/gh/noble-assets/florin?token=7WD7YY13G1&labelColor=black)](https://codecov.io/gh/noble-assets/florin)

This repository includes the `x/florin` Cosmos SDK module implementation.

For more information, refer to the module's [spec](../x/florin/spec) files.
Binary file added .github/banner.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
parsers:
go:
partials_as_hits: true
28 changes: 28 additions & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Unit Tests

on:
push:
branches:
- main
- v*
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.21'

- name: Run Tests
run: make test-unit

- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.florin
.idea
build
coverage.out
68 changes: 68 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.PHONY: proto-format proto-lint proto-gen format lint test-unit build
all: proto-all format lint test-unit build

###############################################################################
### Build ###
###############################################################################

build:
@echo "πŸ€– Building simd..."
@cd simapp && make build 1> /dev/null
@echo "βœ… Completed build!"

###############################################################################
### 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.32

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 \
florin-proto 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!"

proto-setup:
@echo "πŸ€– Setting up protobuf environment..."
@docker build --rm --tag florin-proto:latest --file proto/Dockerfile .
@echo "βœ… Setup protobuf environment!"

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

test-unit:
@echo "πŸ€– Running unit tests..."
@go test -cover -coverprofile=coverage.out -race -v ./x/florin/keeper/...
@echo "βœ… Completed unit tests!"
3 changes: 3 additions & 0 deletions buf.work.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: v1
directories:
- proto
Loading

0 comments on commit 4d55102

Please sign in to comment.