Skip to content

Integration Tests | Push Notifications #20

Integration Tests | Push Notifications

Integration Tests | Push Notifications #20

name: Integration Tests | Push Notifications
on:
workflow_dispatch:
workflow_call:
permissions:
id-token: write
contents: read
jobs:
push-notification-integration-test-iOS:
runs-on: macos-13
timeout-minutes: 30
environment: IntegrationTest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
persist-credentials: false
- name: Make directory
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
- name: Copy integration test resouces
uses: ./.github/composite_actions/download_test_configuration
with:
resource_subfolder: push-notification
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws_region: ${{ secrets.AWS_REGION }}
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG_V2 }}
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16.x
- name: Run Local Server
run: |
cd ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/LocalServer
npm install
npm start &
shell: bash
- name: Run Integration test
uses: ./.github/composite_actions/run_xcodebuild_test
with:
project_path: ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp
scheme: PushNotificationHostApp
destination: 'platform=iOS Simulator,name=iPhone 14,OS=latest'
xcode_path: '/Applications/Xcode_14.3.app'
push-notification-integration-test-tvOS:
runs-on: macos-13
timeout-minutes: 30
environment: IntegrationTest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
persist-credentials: false
- name: Make directory
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
- name: Copy integration test resouces
uses: ./.github/composite_actions/download_test_configuration
with:
resource_subfolder: push-notification
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws_region: ${{ secrets.AWS_REGION }}
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG_V2 }}
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16.x
- name: Run Local Server
run: |
cd ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/LocalServer
npm install
npm start &
shell: bash
- name: Run Integration test
uses: ./.github/composite_actions/run_xcodebuild_test
with:
project_path: ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp
scheme: PushNotificationHostApp
destination: platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4
sdk: appletvsimulator
xcode_path: '/Applications/Xcode_14.3.app'
push-notification-integration-test-watchOS:
runs-on: macos-13
timeout-minutes: 30
environment: IntegrationTest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
with:
persist-credentials: false
- name: Make directory
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
- name: Copy integration test resouces
uses: ./.github/composite_actions/download_test_configuration
with:
resource_subfolder: push-notification
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
aws_region: ${{ secrets.AWS_REGION }}
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG_V2 }}
- name: Set up node
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c
with:
node-version: 16.x
- name: Run Local Server
run: |
cd ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp/LocalServer
npm install
npm start &
shell: bash
- name: Run Integration test
uses: ./.github/composite_actions/run_xcodebuild_test
with:
project_path: ./AmplifyPlugins/Notifications/Push/Tests/PushNotificationHostApp
scheme: PushNotificationWatchTests
destination: platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4
sdk: watchsimulator
xcode_path: '/Applications/Xcode_14.3.app'