-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
951224c
commit 08bdc3e
Showing
1 changed file
with
21 additions
and
8 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ env: | |
ROLE_TO_ASSUME: ${{ secrets.ROLE_TO_ASSUME }} | ||
METRIC_NAME: ${{ secrets.METRIC_NAME }} | ||
METRIC_NAMESPACE: ${{ secrets.METRIC_NAMESPACE }} | ||
|
||
REGION: us-east-1 | ||
|
||
permissions: | ||
id-token: write | ||
|
@@ -32,7 +32,7 @@ jobs: | |
matrix: | ||
# Latest 2 Android versions. TODO: Upgrade to Appium 2 for OS 14 and above. | ||
os_list: ["12", "13"] | ||
demo_download_url_list: ["$DEMO_APP_DOWNLOAD_LINK", "$DEMO_APP_DOWNLOAD_LINK_NO_VIDEO_CODECS"] | ||
demo_flavor_list: ["default", "no-video-codecs"] | ||
outputs: | ||
job-status: ${{ job.status }} | ||
|
||
|
@@ -46,7 +46,14 @@ jobs: | |
|
||
- name: Get latest prod demo app | ||
run: | | ||
wget -O amazon-chime-sdk-app.apk ${{ matrix.demo_download_url_list }} | ||
if [ "${{ matrix.demo_flavor_list }}" = "default" ]; then | ||
wget -O amazon-chime-sdk-app.apk $DEMO_APP_DOWNLOAD_LINK; | ||
elif [ "${{ matrix.demo_flavor_list }}" = "no-video-codecs" ]; then | ||
wget -O amazon-chime-sdk-app.apk $DEMO_APP_DOWNLOAD_LINK_NO_VIDEO_CODECS; | ||
else | ||
echo "Error: Unsupported demo app flavor: ${{ matrix.demo_flavor_list }}"; | ||
exit 1; | ||
fi | ||
- name: Setup Node.js - 15.x | ||
uses: actions/setup-node@v4 | ||
|
@@ -59,6 +66,7 @@ jobs: | |
- name: Run tests against specified Android versions | ||
id: tests | ||
if: false | ||
run: | | ||
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') | ||
npm install | ||
|
@@ -67,7 +75,7 @@ jobs: | |
- name: Send Notification | ||
uses: slackapi/[email protected] | ||
if: failure() | ||
if: false | ||
with: | ||
payload: | | ||
{ | ||
|
@@ -78,25 +86,29 @@ jobs: | |
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v2 | ||
if: always() | ||
with: | ||
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }} | ||
aws-region: us-east-1 | ||
aws-region: ${{ env.REGION }} | ||
|
||
- name: Setup Node.js - 18.x | ||
uses: actions/setup-node@v4 | ||
if: always() | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Install Dependencies | ||
if: always() | ||
run: | | ||
# Required to bydpass issue with canvas dependency: https://github.com/Automattic/node-canvas/issues/1862 | ||
sudo apt-get install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev build-essential g++ | ||
- name: Send Metric to CloudWatch | ||
if: always() | ||
run: | | ||
node -e " | ||
const { CloudWatchClient, PutMetricDataCommand } = require('@aws-sdk/client-cloudwatch'); | ||
const client = new CloudWatchClient({ region: 'us-east-1' }); | ||
const client = new CloudWatchClient({ region: process.env.REGION }); | ||
const value = '${{ job.status }}' === 'failure' ? 0 : 1; | ||
|
@@ -105,8 +117,9 @@ jobs: | |
MetricData: [{ | ||
MetricName: process.env.METRIC_NAME, | ||
Dimensions: [ | ||
{ Name: 'Workflow', Value: 'DailyTest' }, | ||
{ Name: 'Platform', Value: 'Android' } | ||
{ Name: 'Platform', Value: 'Android' }, | ||
{ Name: 'OS', Value: ${{ matrix.os_list }} }, | ||
{ Name: 'Flavor', Value: ${{ matrix.demo_flavor_list }} } | ||
], | ||
Value: value, | ||
}] | ||
|