Skip to content

Commit c4549d5

Browse files
authored
ci: add a smoke test to validate infra setup (#7)
1 parent d654047 commit c4549d5

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/integration-test.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ on:
99
pull_request:
1010
branches:
1111
- main
12+
schedule:
13+
# “At 00:00 on Sunday.”
14+
- cron: "0 0 * * 0"
15+
workflow_dispatch:
1216

1317
jobs:
1418
run-it-tests-job:
@@ -44,7 +48,7 @@ jobs:
4448
pip install localstack awscli-local[ver1]
4549
docker pull localstack/localstack
4650
# Start LocalStack in the background
47-
localstack start -d
51+
LS_LOG=trace localstack start -d
4852
# Wait 30 seconds for the LocalStack container to become ready before timing out
4953
echo "Waiting for LocalStack startup..."
5054
localstack wait -t 30
@@ -67,3 +71,28 @@ jobs:
6771
if: always()
6872
run: |
6973
localstack logs
74+
75+
- name: Send a Slack notification
76+
if: failure() || github.event_name != 'pull_request'
77+
uses: ravsamhq/notify-slack-action@v2
78+
with:
79+
status: ${{ job.status }}
80+
token: ${{ secrets.GITHUB_TOKEN }}
81+
notification_title: "{workflow} has {status_message}"
82+
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}>"
83+
footer: "Linked Repo <{repo_url}|{repo}> | <{run_url}|View Workflow run>"
84+
notify_when: "failure"
85+
env:
86+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
87+
88+
- name: Generate a Diagnostic Report
89+
if: failure()
90+
run: |
91+
curl -s localhost:4566/_localstack/diagnose | gzip -cf > diagnose.json.gz
92+
93+
- name: Upload the Diagnostic Report
94+
if: failure()
95+
uses: actions/upload-artifact@v3
96+
with:
97+
name: diagnose.json.gz
98+
path: ./diagnose.json.gz

0 commit comments

Comments
 (0)