Skip to content

Commit 11b0f8f

Browse files
Try running localhost using the action localstack provides, rather than in docker.
1 parent 62019c6 commit 11b0f8f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.github/workflows/stage-4-acceptance.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ jobs:
111111
needs: environment-set-up
112112
timeout-minutes: 10
113113
env:
114-
LOCALSTACK_INTERNAL_DYNAMODB_ENDPOINT: http://localstack:4566/
114+
LOCALSTACK_INTERNAL_DYNAMODB_ENDPOINT: http://localhost:4566/
115+
RUNNING_LOCALSTACK_URL: http://localhost:4566/
115116
steps:
116117
- name: "Checkout code"
117118
uses: actions/checkout@v4
@@ -124,6 +125,11 @@ jobs:
124125
with:
125126
name: lambda
126127
path: dist/
128+
- name: Start LocalStack
129+
uses: LocalStack/[email protected]
130+
with:
131+
image-tag: 'latest'
132+
install-awslocal: 'true'
127133
- name: "Run integration test"
128134
run: |
129135
make test-integration

tests/integration/conftest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
@pytest.fixture(scope="session")
2222
def localstack(docker_ip, docker_services) -> URL:
23+
if url := os.getenv("RUNNING_LOCALSTACK_URL", None):
24+
logger.info("localstack already running on %s", url)
25+
return URL(url)
2326
logger.info("Starting localstack")
2427
port = docker_services.port_for("localstack", 4566)
2528
url = URL(f"http://{docker_ip}:{port}")

0 commit comments

Comments
 (0)