Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce localstack pro into GitHub Actions(CI) #30

Merged
merged 4 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/linux_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ jobs:
go-version: "1"
check-latest: true

- name: Setup localstack
env:
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }}
LOCALSTACK_AUTH_TOKEN: ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
# https://docs.localstack.cloud/user-guide/ci/github-actions/
run: |
docker compose up -d
echo "Waiting for LocalStack startup..."
sleep 30
echo "Startup complete"

- name: Download dependencies
run: go mod download

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ data
localstack
/s3hub
/spare
.envrc
5 changes: 4 additions & 1 deletion compose.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
services:
localstack:
container_name: "rainbow-localstack"
image: localstack/localstack:latest
image: localstack/localstack-pro:latest
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559" # external services port range
environment:
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN- }
- DEBUG=${DEBUG-}
- DOCKER_HOST=unix:///var/run/docker.sock
- DNS_NAME_PATTERNS_TO_RESOLVE_UPSTREAM='.*cloudfront\.net'
- CLOUDFRONT_STATIC_PORTS= 1
volumes:
- "${LOCALSTACK_VOLUME_DIR:-./localstack}:/var/lib/localstack"
- "/var/run/docker.sock:/var/run/docker.sock"
Expand Down
6 changes: 6 additions & 0 deletions doc/common/developers.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ aws_secret_access_key=test
> [!NOTE]
> Alternatively, you can also set the AWS_PROFILE=localstack environment variable, in which case the --profile localstack parameter can be omitted in the commands above.

### localstack subscriptions
Please access the official website of [localstack](https://www.localstack.cloud/) and obtain a Hobby Subscription. Then, you can get the authentication token from the localstack dashboard. Finally, set the LOCALSTACK_AUTH_TOKEN environment variable. You must not upload the LOCALSTACK_AUTH_TOKEN to the remote repository.
```shell
export LOCALSTACK_AUTH_TOKEN=YOUR_AUTH_TOKEN
```

### Run localstack
Run the following command to start localstack:
```shell
Expand Down
Loading