generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 39
52 lines (45 loc) · 1.4 KB
/
scheduled-integ-tests.yml
File metadata and controls
52 lines (45 loc) · 1.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: Scheduled Integration Tests
on:
schedule:
# Run every 5 minutes
- cron: '*/5 * * * *'
workflow_dispatch:
permissions: {}
jobs:
call-integ-tests:
permissions:
id-token: write
contents: read
actions: read
uses: ./.github/workflows/python-integ.yml
secrets: inherit
publish-metrics:
needs: call-integ-tests
if: always() # Run even if integration tests fail
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
environment: Integ
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws-region: us-east-1
- name: Publish CloudWatch Metrics
run: |
# Determine status value: 0 for success, 1 for failure
if [ "${{ needs.call-integ-tests.result }}" == "success" ]; then
STATUS_VALUE=0
else
STATUS_VALUE=1
fi
echo "Publishing metric with status: ${{ needs.call-integ-tests.result }} (value: $STATUS_VALUE)"
aws cloudwatch put-metric-data \
--namespace "GitHubActions/MCPProxy" \
--metric-name "IntegrationTestFailures" \
--dimensions WorkflowName=IntegrationCanary \
--value $STATUS_VALUE \
--unit Count \
--region us-east-1