File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,18 +37,29 @@ jobs:
3737
3838 - name : Start LocalStack
3939 run : |
40- docker run -d -p 4566:4566 -p 4572:4572 --name localstack localstack/localstack
41- sleep 10 # Wait for LocalStack to initialize
40+ docker run -d -p 4566:4566 --name localstack localstack/localstack
4241
43- - name : Configure AWS CLI for LocalStack
44- run : |
45- aws configure set aws_access_key_id test
46- aws configure set aws_secret_access_key test
47- aws configure set default.region us-east-1
48- aws configure set endpoint_url http://localhost:4566
42+ echo "Waiting for LocalStack to be ready..."
43+
44+ for i in {1..30}; do
45+ if curl -s http://localhost:4566/health | grep '"s3": "running"' > /dev/null; then
46+ echo "LocalStack is ready!"
47+ break
48+ fi
49+ echo "Still waiting..."
50+ sleep 2
51+ done
52+
53+ echo "LocalStack logs:"
54+ docker logs localstack
4955
5056 - name : Create S3 Bucket in LocalStack
51- run : aws s3api create-bucket --bucket test-bucket --endpoint-url http://localhost:4566
57+ env :
58+ AWS_ACCESS_KEY_ID : test
59+ AWS_SECRET_ACCESS_KEY : test
60+ AWS_DEFAULT_REGION : us-east-1
61+ run : |
62+ aws --endpoint-url=http://localhost:4566 s3 mb s3://test-bucket
5263
5364 - name : Install .NET 8
5465 uses : actions/setup-dotnet@v3
You can’t perform that action at this time.
0 commit comments