Skip to content

Commit

Permalink
feat: add simapp & e2e tests (#9)
Browse files Browse the repository at this point in the history
* feat: add simapp & e2e tests

Co-authored-by: Dan Kanefsky <[email protected]>

* chore: fix ci

* chore: small nits

* chore: restructure ci

* chore: switch away from fork

---------

Co-authored-by: Dan Kanefsky <[email protected]>
  • Loading branch information
johnletey and boojamya authored Oct 26, 2023
1 parent 33b30a6 commit 32fd993
Show file tree
Hide file tree
Showing 27 changed files with 8,995 additions and 142 deletions.
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

0 comments on commit 32fd993

Please sign in to comment.