Skip to content

Commit c13b293

Browse files
committed
Separate daily test metrics
1 parent 951224c commit c13b293

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/daily-test.yml

+21-8
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
ROLE_TO_ASSUME: ${{ secrets.ROLE_TO_ASSUME }}
1919
METRIC_NAME: ${{ secrets.METRIC_NAME }}
2020
METRIC_NAMESPACE: ${{ secrets.METRIC_NAMESPACE }}
21-
21+
REGION: us-east-1
2222

2323
permissions:
2424
id-token: write
@@ -32,7 +32,7 @@ jobs:
3232
matrix:
3333
# Latest 2 Android versions. TODO: Upgrade to Appium 2 for OS 14 and above.
3434
os_list: ["12", "13"]
35-
demo_download_url_list: ["$DEMO_APP_DOWNLOAD_LINK", "$DEMO_APP_DOWNLOAD_LINK_NO_VIDEO_CODECS"]
35+
demo_flavor_list: ["default", "no-video-codecs"]
3636
outputs:
3737
job-status: ${{ job.status }}
3838

@@ -46,7 +46,14 @@ jobs:
4646

4747
- name: Get latest prod demo app
4848
run: |
49-
wget -O amazon-chime-sdk-app.apk ${{ matrix.demo_download_url_list }}
49+
if [ "${{ matrix.demo_flavor_list }}" = "default" ]; then
50+
wget -O amazon-chime-sdk-app.apk $DEMO_APP_DOWNLOAD_LINK;
51+
elif [ "${{ matrix.demo_flavor_list }}" = "no-video-codecs" ]; then
52+
wget -O amazon-chime-sdk-app.apk $DEMO_APP_DOWNLOAD_LINK_NO_VIDEO_CODECS;
53+
else
54+
echo "Error: Unsupported demo app flavor: ${{ matrix.demo_flavor_list }}";
55+
exit 1;
56+
fi
5057
5158
- name: Setup Node.js - 15.x
5259
uses: actions/setup-node@v4
@@ -59,6 +66,7 @@ jobs:
5966
6067
- name: Run tests against specified Android versions
6168
id: tests
69+
if: false
6270
run: |
6371
id=$(curl -F '[email protected]' -F name=amazon-chime-sdk-app.apk -u "${{ secrets.SAUCE_USERNAME }}:${{ secrets.SAUCE_ACCESS_KEY }}" 'https://api.us-west-1.saucelabs.com/v1/storage/upload' |jq '.item.id')
6472
npm install
@@ -67,7 +75,7 @@ jobs:
6775
6876
- name: Send Notification
6977
uses: slackapi/[email protected]
70-
if: failure()
78+
if: false
7179
with:
7280
payload: |
7381
{
@@ -78,25 +86,29 @@ jobs:
7886
7987
- name: Configure AWS Credentials
8088
uses: aws-actions/configure-aws-credentials@v2
89+
if: always()
8190
with:
8291
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
83-
aws-region: us-east-1
92+
aws-region: ${{ env.REGION }}
8493

8594
- name: Setup Node.js - 18.x
8695
uses: actions/setup-node@v4
96+
if: always()
8797
with:
8898
node-version: 18.x
8999

90100
- name: Install Dependencies
101+
if: always()
91102
run: |
92103
# Required to bydpass issue with canvas dependency: https://github.com/Automattic/node-canvas/issues/1862
93104
sudo apt-get install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
94105
95106
- name: Send Metric to CloudWatch
107+
if: always()
96108
run: |
97109
node -e "
98110
const { CloudWatchClient, PutMetricDataCommand } = require('@aws-sdk/client-cloudwatch');
99-
const client = new CloudWatchClient({ region: 'us-east-1' });
111+
const client = new CloudWatchClient({ region: process.env.REGION });
100112
101113
const value = '${{ job.status }}' === 'failure' ? 0 : 1;
102114
@@ -105,8 +117,9 @@ jobs:
105117
MetricData: [{
106118
MetricName: process.env.METRIC_NAME,
107119
Dimensions: [
108-
{ Name: 'Workflow', Value: 'DailyTest' },
109-
{ Name: 'Platform', Value: 'Android' }
120+
{ Name: 'Platform', Value: 'Android' },
121+
{ Name: 'OS', Value: ${{ matrix.os_list }} },
122+
{ Name: 'Flavor', Value: ${{ matrix.flavor }} }
110123
],
111124
Value: value,
112125
}]

0 commit comments

Comments
 (0)