Skip to content

Commit

Permalink
test daily test alarm
Browse files Browse the repository at this point in the history
  • Loading branch information
dylonChime committed Jan 21, 2025
1 parent 17cd72c commit f077415
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/daily-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,14 @@ jobs:
steps:
- name: Checkout test package
uses: actions/checkout@v4
if: always()
with:
repository: awslabs/amazon-chime-sdk-apple
token: ${{ secrets.GH_INTEG_READ_ONLY_PAT }}
ref: automated-test-development

- name: Get latest prod demo app
if: always()
run: |
if [ "${{ matrix.demo_flavor_list }}" = "default" ]; then
wget -O amazon-chime-sdk-app.ipa $DEMO_APP_DOWNLOAD_LINK;
Expand All @@ -56,24 +58,28 @@ jobs:
fi
- name: Setup Node.js - 15.x
uses: actions/setup-node@v4
if: always()
with:
node-version: 15.x

- name: Install Dependencies
if: always()
run: |
npm install @aws-sdk/client-cloudwatch
- name: Run test against specified iOS versions
id: tests
if: always()
run: |
exit 1
id=$(curl -F 'payload=@amazon-chime-sdk-app.ipa' -F name=amazon-chime-sdk-app.ipa -u "${{ secrets.SAUCE_USERNAME }}:${{ secrets.SAUCE_ACCESS_KEY }}" 'https://api.us-west-1.saucelabs.com/v1/storage/upload' |jq '.item.id')
npm install
npm run build
npm run cma -- --app-url "sample.app" --log-level error --tag "@common" --app-id "${id}" --retry --platform-version "${{ matrix.os_list }}"
#npm install
#npm run build
#npm run cma -- --app-url "sample.app" --log-level error --tag "@common" --app-id "${id}" --retry --platform-version "${{ matrix.os_list }}"
- name: Send Notification
uses: slackapi/slack-github-action@v1.25.0
if: failure()
if: false
with:
payload: |
{
Expand All @@ -84,21 +90,25 @@ jobs:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
if: always()
with:
role-to-assume: ${{ secrets.ROLE_TO_ASSUME }}
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');
Expand All @@ -119,7 +129,7 @@ jobs:
}]
});
client.send(command).then(() => console.log('Daily test result sent to CloudWatch')).catch(err => {
client.send(command).then(() => console.log('Daily test result sent to CloudWatch: ' + value)).catch(err => {
console.error('Failed to send metric. Error: ', err);
process.exit(1);
});
Expand Down

0 comments on commit f077415

Please sign in to comment.