Skip to content

E2E Functional Tests #213

E2E Functional Tests

E2E Functional Tests #213

#
# Copyright 2022 Adobe. All rights reserved.
# This file is licensed to you under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. You may obtain a copy
# of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
# OF ANY KIND, either express or implied. See the License for the specific language
# governing permissions and limitations under the License.
#
name: E2E Functional Tests
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
schedule:
- cron: '0 11 * * *'
- 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, 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-13
strategy:
matrix:
api-level: [29]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Job run identifier ${{ github.event.inputs.id }}
run: |
if [ -z "${{ github.event.inputs.id }}" ]; then \
echo No job run identifier was set.
else
echo 'Job run identifier is:' ${{ inputs.id }}
fi;
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.branch }}
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: ${{ github.event.inputs.id || 'scheduled' }}
run: echo Run Identifier is ${{ inputs.id || 'scheduled' }}
# Update messaging build config to set the ADOBE_ENVIRONMENT value to use for testing
- name: Update environment
run: make set-environment ENV=${{ github.event.inputs.environment || 'prodVA7' }}
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: 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 }}