Skip to content

Commit

Permalink
feat: add simapp & e2e tests
Browse files Browse the repository at this point in the history
Co-authored-by: Dan Kanefsky <[email protected]>
  • Loading branch information
johnletey and boojamya committed Oct 26, 2023
1 parent 33b30a6 commit dc182e5
Show file tree
Hide file tree
Showing 27 changed files with 9,027 additions and 142 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/e2e-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: E2E Tests

on:
pull_request:
push:

env:
TAR_PATH: heighliner.tar

jobs:
heighliner:
runs-on: ubuntu-latest
steps:
- name: Build Docker image
uses: strangelove-ventures/[email protected]
with:
registry: ""
tag: local
tar-export-path: ${{ env.TAR_PATH }}
platform: linux/amd64
git-ref: ${{ github.head_ref }}

chain: noble-fiattokenfactory-simd
dockerfile: cosmos
build-target: make install
binaries: |
- simapp/build/simd
- name: Publish Tarball as Artifact
uses: actions/upload-artifact@v3
with:
path: ${{ env.TAR_PATH }}

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: Load Image
run: docker image load -i ${{ env.TAR_PATH }}

- 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 dc182e5

Please sign in to comment.