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

feat: add simapp & e2e tests #9

Merged
merged 5 commits into from
Oct 26, 2023
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
26 changes: 26 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: E2E Tests

on:
pull_request:
push:

jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Install Heighliner
run: go install github.com/strangelove-ventures/heighliner@latest

- name: Build Image
run: make heighliner

- name: Run E2E Tests
run: make test-e2e
3 changes: 2 additions & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Unit Tests

on:
pull_request:
push:

jobs:
unit-tests:
Expand All @@ -16,4 +17,4 @@ jobs:
go-version: 1.21

- name: Run Unit Tests
run: go test -cover -race -v ./x/...
run: make test-unit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.idea
build
31 changes: 26 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
.PHONY: proto-setup proto-format proto-lint proto-gen format lint test
all: proto-all format lint test
.PHONY: proto-setup proto-format proto-lint proto-gen format lint test-e2e test-unit build
all: proto-all format lint test-unit build

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

build:
@echo "🤖 Building simd..."
@cd simapp && make build
@echo "✅ Completed build!"

###############################################################################
### Formatting & Linting ###
Expand Down Expand Up @@ -53,7 +62,19 @@ proto-setup:
### Testing ###
###############################################################################

test:
@echo "🤖 Running tests..."
heighliner:
@echo "🤖 Building image..."
@heighliner build --chain noble-fiattokenfactory-simd --local 1> /dev/null
@echo "✅ Completed build!"

test: test-e2e test-unit

test-e2e:
@echo "🤖 Running e2e tests..."
@cd e2e && GOWORK=off go test -race -v ./...
@echo "✅ Completed e2e tests!"

test-unit:
@echo "🤖 Running unit tests..."
@go test -cover -race -v ./x/...
@echo "✅ Completed tests!"
@echo "✅ Completed unit tests!"
5 changes: 5 additions & 0 deletions chains.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- name: noble-fiattokenfactory-simd
dockerfile: cosmos
build-target: make build
binaries:
- simapp/build/simd
Loading