-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c793155
commit 73ea63e
Showing
1 changed file
with
63 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,63 @@ | ||
# setup-localstack | ||
Sets up LocalStack CLI in your GitHub Actions workflow ☁️ | ||
# Setup LocalStack | ||
|
||
[![LocalStack Test](https://github.com/HarshCasper/setup-localstack/actions/workflows/ci.yml/badge.svg)](https://github.com/HarshCasper/setup-localstack/actions/workflows/ci.yml) | ||
|
||
|
||
A GitHub Action to setup [LocalStack](https://github.com/localstack/localstack) on your GitHub Actions runner workflow by: | ||
|
||
- Pulling a specific version of the LocalStack Docker Image into the GitHub Action runner. | ||
- Configuring the [LocalStack CLI](https://docs.localstack.cloud/get-started/#localstack-cli) to launch the Docker container with an optional API token for pro usage. | ||
- Installing [LocalStack AWS CLI](https://github.com/localstack/awscli-local), a thin wrapper around the `aws` command line interface for use with LocalStack to run integration tests over AWS services. | ||
|
||
## Usage | ||
|
||
To get started, you can use this minimal example: | ||
|
||
```yml | ||
- name: Start LocalStack | ||
uses: HarshCasper/[email protected] | ||
with: | ||
image-tag: 'latest' | ||
install-awslocal: 'true' | ||
env: | ||
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | ||
``` | ||
### Inputs | ||
|Input|Description |Default | ||
|--|--|--| | ||
|`image-tag` |Tag of the LocalStack Docker image to use |`latest` | ||
|`install-awslocal` |Whether to install the `awslocal` CLI into the build environment | `true` | ||
|
||
### Example workflow | ||
|
||
```yml | ||
name: LocalStack Test | ||
on: [ push, pull_request ] | ||
jobs: | ||
localstack-action-test: | ||
name: 'Test LocalStack GitHub Action' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Start LocalStack | ||
uses: HarshCasper/[email protected] | ||
with: | ||
image-tag: 'latest' | ||
install-awslocal: 'true' | ||
env: | ||
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | ||
- name: Run Tests against LocalStack | ||
run: | | ||
awslocal s3 mb s3://test | ||
awslocal s3 ls | ||
echo "Test Execution complete!" | ||
``` | ||
|
||
## License | ||
|
||
[MIT License](https://github.com/HarshCasper/validate-issues-over-pull-requests/blob/main/LICENSE) |