Skip to content

Commit

Permalink
Merge pull request #1800 from rajatjindal/separate-e2e-steps
Browse files Browse the repository at this point in the history
separate out build and run e2e tests step
  • Loading branch information
rajatjindal authored Sep 25, 2023
2 parents 91341d8 + 62189fa commit 8858603
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,13 @@ jobs:
name: spin-ubuntu-latest
path: target/release/

- name: Run e2e tests
- name: Build e2e tests image
run: |
export E2E_FETCH_SPIN=false
make build-test-spin-up
- name: Run e2e tests image
run: |
chmod +x `pwd`/target/release/spin
export E2E_VOLUME_MOUNT="-v `pwd`/target/release/spin:/usr/local/bin/spin"
export E2E_FETCH_SPIN=false
make test-spin-up
make run-test-spin-up
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,14 @@ test-integration: test-kv
RUST_LOG=$(LOG_LEVEL) cargo test --test integration --no-fail-fast -- --skip spinup_tests --skip cloud_tests --nocapture

.PHONY: test-spin-up
test-spin-up:
test-spin-up: build-test-spin-up-docker run-test-spin-up-docker

.PHONY: build-test-spin-up
build-test-spin-up:
docker build -t spin-e2e-tests --build-arg FETCH_SPIN=$(E2E_FETCH_SPIN) --build-arg BUILD_SPIN=$(E2E_BUILD_SPIN) -f $(E2E_TESTS_DOCKERFILE) .

.PHONY: run-test-spin-up
run-test-spin-up:
REDIS_IMAGE=$(REDIS_IMAGE) MYSQL_IMAGE=$(MYSQL_IMAGE) POSTGRES_IMAGE=$(POSTGRES_IMAGE) \
docker compose -f e2e-tests-docker-compose.yml run $(E2E_VOLUME_MOUNT) e2e-tests

Expand Down

0 comments on commit 8858603

Please sign in to comment.