18
18
ROLE_TO_ASSUME : ${{ secrets.ROLE_TO_ASSUME }}
19
19
METRIC_NAME : ${{ secrets.METRIC_NAME }}
20
20
METRIC_NAMESPACE : ${{ secrets.METRIC_NAMESPACE }}
21
-
21
+ REGION : us-east-1
22
22
23
23
permissions :
24
24
id-token : write
32
32
matrix :
33
33
# Latest 2 Android versions. TODO: Upgrade to Appium 2 for OS 14 and above.
34
34
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 "]
36
36
outputs :
37
37
job-status : ${{ job.status }}
38
38
46
46
47
47
- name : Get latest prod demo app
48
48
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
50
57
51
58
- name : Setup Node.js - 15.x
52
59
uses : actions/setup-node@v4
59
66
60
67
- name : Run tests against specified Android versions
61
68
id : tests
69
+ if : false
62
70
run : |
63
71
id=$(curl -F 'payload=@amazon-chime-sdk-app.apk' -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')
64
72
npm install
67
75
68
76
- name : Send Notification
69
77
uses : slackapi/slack-github-action@v1.25.0
70
- if : failure()
78
+ if : false
71
79
with :
72
80
payload : |
73
81
{
@@ -78,25 +86,29 @@ jobs:
78
86
79
87
- name : Configure AWS Credentials
80
88
uses : aws-actions/configure-aws-credentials@v2
89
+ if : always()
81
90
with :
82
91
role-to-assume : ${{ secrets.ROLE_TO_ASSUME }}
83
- aws-region : us-east-1
92
+ aws-region : ${{ env.REGION }}
84
93
85
94
- name : Setup Node.js - 18.x
86
95
uses : actions/setup-node@v4
96
+ if : always()
87
97
with :
88
98
node-version : 18.x
89
99
90
100
- name : Install Dependencies
101
+ if : always()
91
102
run : |
92
103
# Required to bydpass issue with canvas dependency: https://github.com/Automattic/node-canvas/issues/1862
93
104
sudo apt-get install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++
94
105
95
106
- name : Send Metric to CloudWatch
107
+ if : always()
96
108
run : |
97
109
node -e "
98
110
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 });
100
112
101
113
const value = '${{ job.status }}' === 'failure' ? 0 : 1;
102
114
@@ -105,8 +117,9 @@ jobs:
105
117
MetricData: [{
106
118
MetricName: process.env.METRIC_NAME,
107
119
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.demo_flavor_list }} }
110
123
],
111
124
Value: value,
112
125
}]
0 commit comments