diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccd09ae..e41db95 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: run-unit-tests: true run-integration-tests: true integration-tests-command: | - make test-e2e + make test-integration docker_pipeline: uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2 @@ -21,4 +21,4 @@ jobs: with: publish: false dockerfile: ./contrib/images/local-bcd/Dockerfile - repoName: babylon-sdk \ No newline at end of file + repoName: babylon-sdk diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..ee4ae93 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,18 @@ +name: e2e +on: + push: + branches: + - '**' + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Cache Go + uses: actions/setup-go@v5 + with: + go-version: 1.23 + - name: Run E2E Tests + run: sudo make test-e2e diff --git a/.github/workflows/integration-e2e.yml b/.github/workflows/integration-e2e.yml deleted file mode 100644 index cb0e1de..0000000 --- a/.github/workflows/integration-e2e.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: integration-e2e -on: - push: - branches: - - '**' - -jobs: - test: - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Build IBC Simulator BCD Image - run: make build-ibcsim-bcd - - - name: Build Babylond Image - run: make build-babylond - - - name: Cache Go - uses: actions/setup-go@v5 - with: - go-version: 1.23 - - - name: Run Integration Tests - run: sudo make test-e2e-bcd-consumer-integration diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 528788f..53d6d03 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: run-unit-tests: true run-integration-tests: true integration-tests-command: | - make test-e2e + make test-integration docker_pipeline: uses: babylonlabs-io/.github/.github/workflows/reusable_docker_pipeline.yml@v0.11.2 @@ -24,4 +24,4 @@ jobs: with: publish: true dockerfile: ./contrib/images/local-bcd/Dockerfile - repoName: babylon-sdk \ No newline at end of file + repoName: babylon-sdk diff --git a/Makefile b/Makefile index 190a9e9..0753939 100644 --- a/Makefile +++ b/Makefile @@ -27,11 +27,19 @@ test-all: test test: $(MAKE) -C demo test $(MAKE) -C x test - $(MAKE) -C tests/e2e/ test -test-e2e: +test-integration: $(MAKE) -C tests/e2e/ test +test-e2e: build-docker-e2e test-e2e-cache + +test-e2e-cache: + $(MAKE) test-e2e-bcd-consumer-integration + +clean-e2e: + docker container rm -f $(shell docker container ls -a -q) || true + docker network prune -f || true + ############################################################################### ### Linting ### ############################################################################### @@ -83,6 +91,8 @@ proto-lint: ### Integration e2e ### ############################################################################### +build-docker-e2e: build-ibcsim-bcd build-babylond + build-ibcsim-bcd: $(MAKE) -C contrib/images ibcsim-bcd @@ -93,6 +103,4 @@ start-bcd-consumer-integration: $(MAKE) -C contrib/images start-bcd-consumer-integration test-e2e-bcd-consumer-integration: start-bcd-consumer-integration - @cd tests/e2e - @go test -run TestBCDConsumerIntegrationTestSuite -mod=readonly -timeout=60m -v github.com/babylonlabs-io/babylon-sdk/tests/e2e --tags=e2e - @cd - + @cd tests/e2e && go test -run TestBCDConsumerIntegrationTestSuite -mod=readonly -timeout=60m -v github.com/babylonlabs-io/babylon-sdk/tests/e2e --tags=e2e