Skip to content

E2E Functional Tests #2009

E2E Functional Tests

E2E Functional Tests #2009

# Remote action to execute e2e functional tests
name: E2E Functional Tests
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
schedule:
- cron: '0 23 * * *'
workflow_dispatch:
inputs:
branch:
description: 'Branch to use when running functional tests'
required: false
default: 'main'
id:
description: 'Identifier for the run'
required: false
environment:
description: 'Environment and region to test (prodVA7, prodAUS5, prodNLD2, prodVA6, prodCAN2, prodGBR9, prodIND2, stageVA7)'
required: true
default: 'prodVA7'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
functional-test:
# The type of runner that the job will run on
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0.1'
- name: Launch iOS Simulator
uses: futureware-tech/simulator-action@bfa03d93ec9de6dacb0c5553bbf8da8afc6c2ee9
with:
model: 'iPhone 15'
os: 'iOS'
os_version: '17.5'
erase_before_boot: false
shutdown_after_job: false
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch || 'main' }}
- name: Update cocoapods in Project
run: make pod-install
- name: ${{ github.event.inputs.id || 'scheduled' }}
run: echo Run Identifier is ${{ inputs.id || 'scheduled' }}
# Update the plist file which controls the environment used by the e2e tests
- name: Update environment
run: make set-environment ENV=${{ github.event.inputs.environment || 'prodVA7' }}
# Runs a single command using the runners shell
- name: Execute E2E functional tests
run: make e2e-functional-test
- name: Update Slack on failure
if: failure()
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486
with:
status: ${{ job.status }}
fields: repo,action,ref,workflow
text: |
E2E Testing for Inbound Personalization has Failed :(
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}