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(e2e): add integration tests (backport #100) #107

Closed
wants to merge 1 commit into from
Closed
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
15 changes: 14 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: 1.20.2
go-version: 1.21
cache: true
cache-dependency-path: go.sum
- uses: technote-space/[email protected]
Expand All @@ -33,13 +33,18 @@ jobs:
- name: Unit Tests
if: env.GIT_DIFF
run: |
go work init
make test

test-integration:
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
<<<<<<< HEAD
- uses: actions/checkout@v3
=======
- uses: actions/checkout@v4
>>>>>>> 454d2e5 (feat(e2e): add integration tests (#100))
- uses: technote-space/[email protected]
with:
PATTERNS: |
Expand All @@ -49,7 +54,11 @@ jobs:
- uses: actions/setup-go@v4
if: env.GIT_DIFF
with:
<<<<<<< HEAD
go-version: "1.20"
=======
go-version: "1.21"
>>>>>>> 454d2e5 (feat(e2e): add integration tests (#100))
cache: true

# In this step, this action saves a list of existing images, the cache is
Expand All @@ -64,4 +73,8 @@ jobs:
- name: Integration Tests
if: env.GIT_DIFF
run: |
<<<<<<< HEAD
=======
go work init
>>>>>>> 454d2e5 (feat(e2e): add integration tests (#100))
make test-integration
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ build/
# Dependency directories (remove the comment below to include it)
# vendor/

# Workspace state
go.work*

# IDE
.idea/
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,15 @@ use-integration:

docker-build: use-main
@echo "Building E2E Docker image..."
@DOCKER_BUILDKIT=1 docker build -t skip-mev/pob-e2e -f contrib/images/pob.e2e.Dockerfile .
@DOCKER_BUILDKIT=1 docker build -t skip-mev/block-sdk-e2e -f contrib/images/block-sdk.e2e.Dockerfile .

docker-build-integration: use-main
@echo "Building integration-test Docker image..."
<<<<<<< HEAD
@DOCKER_BUILDKIT=1 docker build -t block-sdk-integration -f contrib/images/pob.integration.Dockerfile .
=======
@DOCKER_BUILDKIT=1 docker build -t block-sdk-integration -f contrib/images/block-sdk.integration.Dockerfile .
>>>>>>> 454d2e5 (feat(e2e): add integration tests (#100))

###############################################################################
### Tests ###
Expand All @@ -119,7 +123,7 @@ TEST_INTEGRATION_TAGS = integration

test-integration: $(TEST_INTEGRATION_DEPS)
@ echo "Running integration tests..."
@go test ./tests/integration/pob_integration_test.go -timeout 30m -race -v -tags='$(TEST_INTEGRATION_TAGS)'
@go test ./tests/integration/block_sdk_integration_test.go -timeout 30m -race -v -tags='$(TEST_INTEGRATION_TAGS)'

test: use-main
@go test -v -race $(shell go list ./... | grep -v tests/)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20-bullseye AS builder
FROM golang:1.21-bullseye AS builder

WORKDIR /src/pob
COPY . .
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/skip-mev/block-sdk

go 1.20
go 1.21

require (
cosmossdk.io/api v0.3.1
Expand Down
3 changes: 0 additions & 3 deletions go.work

This file was deleted.

Loading
Loading