Skip to content

chore(pre-release): 0.1.7-0 πŸŽ‰ #2

chore(pre-release): 0.1.7-0 πŸŽ‰

chore(pre-release): 0.1.7-0 πŸŽ‰ #2

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow performs a full End 2 End test of the App.
# It includes all versions of the past 6 months.
# And uses the Android Target API level requirements for Google Play apps 33.
# https://support.google.com/googleplay/android-developer/answer/11926878?sjid=9314081280512290806-EU
name: E2E Test with FusionAuth supported versions
on:
# To allow running this workflow manually from the Actions tab we add:
workflow_dispatch:
# Triggers the workflow on push request events but only for tag versions
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]'
- 'v[0-9]+.[0-9]+.[0-9]+-*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "e2e-test"
e2e-test:
name: End 2 End Test
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
# The type of runner that the job will run on
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
api-level: [33]
target: [google_apis]
arch: [x86_64]
fusionauth-docker-image-version: [1.47.1, 1.48.3, 1.49.2, 1.50.1, 1.51.0]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Sets up JDK as a prerequisite to run Gradle
- name: Setup Java
uses: actions/[email protected]
with:
java-version: '17'
distribution: 'zulu'
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout repository
uses: actions/[email protected]
# Create and start FusionAuth containers used by E2E test and sleeps for 30 seconds.
# Despite its waiting until the container started with the status healthy,
# it will run the kickstart after that, which takes a moment.
- name: Start FusionAuth
uses: fusionauth/fusionauth-github-action@v1
with:
FUSIONAUTH_VERSION: ${{ matrix.fusionauth-docker-image-version }}
FUSIONAUTH_APP_KICKSTART_DIRECTORY_PATH: fusionauth/${{ matrix.fusionauth-docker-image-version }}/kickstart
# Setup and start Device Emulator used by E2E test
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
# Performs E2E Test using android-emulator-runner
- name: run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
script: |
adb shell pm clear com.android.chrome
adb shell am set-debug-app --persistent com.android.chrome
adb shell 'echo "chrome --disable-fre --no-default-browser-check --no-first-run" > /data/local/tmp/chrome-command-line'
adb emu screenrecord start --time-limit 300 ./recording_video.webm
./gradlew connectedAndroidTest
# Upload E2E Test recording
- name: Upload recording
uses: actions/[email protected]
if: ${{ failure() }}
with:
name: 'E2E Test recording - ${{ matrix.api-level }} ${{ matrix.target }} ${{ matrix.arch }} ${{ matrix.fusionauth-docker-image-version }}'
path: recording_video.webm