Skip to content

Commit

Permalink
Ensure to wait the localstack port listen
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Aug 21, 2020
1 parent a5752a9 commit d6fee0d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ jobs:
- name: docker build
run: docker-compose build
- name: start localstack
run: docker-compose up -d localstack
- name: wait until s3 bucket exists
run: docker-compose exec -T localstack /docker-entrypoint-initaws.d/wait_s3_bucket_exists.sh
run: |
docker-compose up -d localstack
docker-compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker-compose exec -T localstack /docker-entrypoint-initaws.d/wait_s3_bucket_exists.sh
- name: terraform --version
run: docker-compose run --rm tfmigrate terraform --version
- name: testacc
Expand Down
5 changes: 5 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ services:
S3_BUCKET: "tfstate-test"
volumes:
- "./scripts/localstack:/docker-entrypoint-initaws.d" # initialize scripts on startup

dockerize:
image: jwilder/dockerize
depends_on:
- localstack

0 comments on commit d6fee0d

Please sign in to comment.