diff --git a/.github/workflows/github-actions-demo.yml b/.github/workflows/github-actions-demo.yml new file mode 100644 index 0000000..ad325ed --- /dev/null +++ b/.github/workflows/github-actions-demo.yml @@ -0,0 +1,23 @@ +name: localstack-action-example +on: push +jobs: + example-job: + runs-on: ubuntu-latest + steps: + - name: Start LocalStack + env: + LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} + run: | + pip install localstack awscli-local[ver1] # install LocalStack cli and awslocal + docker pull localstack/localstack # Make sure to pull the latest version of the image + localstack start -d # Start LocalStack in the background + + echo "Waiting for LocalStack startup..." # Wait 30 seconds for the LocalStack container + localstack wait -t 30 # to become ready before timing out + echo "Startup complete" + - name: Run some Tests against LocalStack + run: | + awslocal s3 mb s3://test + awslocal s3 ls + awslocal s3 ls + echo "Test Execution complete!"