update artifacts GitHub actions to v4 #522
Workflow file for this run
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
name: LocalStack Test | |
on: | |
pull_request: | |
paths-ignore: | |
- ./*.md | |
- LICENSE | |
workflow_dispatch: | |
schedule: | |
- cron: '48 23 * * 0' | |
jobs: | |
localstack-action-test: | |
name: 'Test LocalStack GitHub Action' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# We must hack the action call as remote to be able to use the relative paths | |
# Could it break with different CWD? 🤔 | |
- name: Start LocalStack | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"image-tag": "latest", | |
"install-awslocal": "true", | |
"configuration": "DEBUG=1", | |
"use-pro": "true", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
- name: Run Tests Against LocalStack | |
run: | | |
awslocal s3 mb s3://test | |
awslocal s3 ls | |
echo "Test Execution complete!" | |
localstack-action-version-test: | |
name: 'Test LocalStack Version with Github Actions' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
# We must hack the action call as remote to be able to use the relative paths | |
# Could it break with different CWD? 🤔 | |
- name: Start LocalStack | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"image-tag": "3.2.0", | |
"install-awslocal": "true", | |
"configuration": "DEBUG=1", | |
"use-pro": "true", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
- name: Run Version Test Against LocalStack | |
run: | | |
LS_VERSION=$(docker ps | grep localstack | cut -d " " -f4 | cut -d ":" -f2) | |
exit $(test "x${LS_VERSION}" = "x3.2.0") | |
cloud-pods-test: | |
name: 'Test Cloud Pods Action' | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⚡️ Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Start LocalStack | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"image-tag": "latest", | |
"install-awslocal": "true", | |
"configuration": "DEBUG=1", | |
"use-pro": "true", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
- name: Run AWS commands | |
run: | | |
awslocal s3 mb s3://test | |
awslocal sqs create-queue --queue-name test-queue | |
- name: Save the Cloud Pod | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"state-name": "cloud-pods-test", | |
"state-action": "save", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
local-state-test: | |
name: 'Test Local State Action' | |
runs-on: ubuntu-latest | |
steps: | |
- name: ⚡️ Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Start LocalStack | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"image-tag": "latest", | |
"install-awslocal": "true", | |
"configuration": "DEBUG=1", | |
"use-pro": "true", | |
"state-name": "cloud-pods-test", | |
"state-action": "load", | |
"state-backend": "local", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} | |
- name: Run AWS Commands | |
run: | | |
awslocal s3 mb s3://test | |
awslocal s3 rb s3://test | |
awslocal sqs create-queue --queue-name test-queue | |
awslocal sqs delete-queue --queue-url $(awslocal sqs get-queue-url --queue-name test-queue --output text) | |
- name: Save the State Artifact | |
uses: jenseng/dynamic-uses@v1 | |
with: | |
uses: LocalStack/setup-localstack@${{ env.GH_ACTION_VERSION }} | |
with: |- | |
{ | |
"state-name": "cloud-pods-test", | |
"state-action": "save", | |
"state-backend": "local", | |
} | |
env: | |
LOCALSTACK_API_KEY: ${{ secrets.LOCALSTACK_API_KEY }} | |
GH_ACTION_VERSION: ${{ github.event_name == 'pull_request' && github.head_ref || github.ref_name }} |