Skip to content

Test allurectl 386

Test allurectl 386 #53

Workflow file for this run

name: E2E Tests
on:
pull_request:
workflow_dispatch:
inputs:
run_nightly_checks:
description: 'Should nightly checks be executed?'
type: boolean
required: false
default: false
push: # FIXME
schedule:
# Runs "At 01:00 every night except weekends"
- cron: '0 1 * * 1-5'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
EMU_OPTIONS: "-no-snapshot-save -no-window -no-audio -no-boot-anim -gpu swiftshader_indirect -camera-back none -camera-front none"
jobs:
build-apks:
name: Build
runs-on: ubuntu-24.04
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/java-cache
- uses: ./.github/actions/enable-kvm
- uses: ./.github/actions/ruby-cache
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
- name: Build apks
run: bundle exec fastlane build_e2e_test
- name: Upload apks
uses: actions/[email protected]
with:
name: apks
path: |
stream-chat-android-compose-sample/build/outputs/apk/e2e/debug/*.apk
stream-chat-android-compose-sample/build/outputs/apk/androidTest/e2e/debug/*.apk
run-tests:
name: Test
runs-on: ubuntu-24.04
# if: ${{ github.event_name != 'schedule' }}
needs: build-apks
env:
ANDROID_API_VERSION: 35
steps:
- name: Connect Bot
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- uses: actions/[email protected]
- uses: actions/[email protected]
continue-on-error: true
with:
name: apks
- uses: ./.github/actions/java-cache
- uses: ./.github/actions/enable-kvm
- uses: ./.github/actions/ruby-cache
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
- uses: ./.github/actions/allure-launch
with:
allure-token: ${{ secrets.ALLURE_TOKEN }}
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_VERSION }}
disable-animations: true
profile: pixel
arch : x86_64
emulator-options: ${{ env.EMU_OPTIONS }}
script: bundle exec fastlane run_e2e_test
- name: Allure TestOps Upload
if: success() || failure()
run: bundle exec fastlane allure_upload
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
LAUNCH_ID: ${{ env.LAUNCH_ID }}
- name: Allure TestOps Launch Removal
if: cancelled()
run: bundle exec fastlane allure_launch_removal
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
LAUNCH_ID: ${{ env.LAUNCH_ID }}
- name: Upload test results
uses: actions/[email protected]
if: failure()
with:
name: test_report
path: |
./**/build/reports/androidTests/*
fastlane/stream-chat-test-mock-server/logs/*
run-tests-nightly:
name: Test Nightly
runs-on: ubuntu-24.04
# if: ${{ github.event_name == 'schedule' }} or ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_nightly_checks == 'true' }}
needs: build-apks
strategy:
matrix:
include:
- android_api_version: 35
- android_api_version: 34
- android_api_version: 33
- android_api_version: 32
- android_api_version: 31
- android_api_version: 29
- android_api_version: 28
fail-fast: false
env:
ANDROID_API_VERSION: ${{ matrix.android_api_version }}
steps:
- name: Connect Bot
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- uses: actions/[email protected]
- uses: actions/[email protected]
continue-on-error: true
with:
name: apks
- uses: ./.github/actions/java-cache
- uses: ./.github/actions/enable-kvm
- uses: ./.github/actions/ruby-cache
- uses: ./.github/actions/gradle-cache
with:
key-prefix: gradle-test
- uses: ./.github/actions/allure-launch
with:
allure-token: ${{ secrets.ALLURE_TOKEN }}
cron: true
- name: Run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_VERSION }}
disable-animations: true
profile: pixel
arch : x86_64
emulator-options: ${{ env.EMU_OPTIONS }}
script: bundle exec fastlane run_e2e_test
- name: Allure TestOps Upload
run: bundle exec fastlane allure_upload
if: success() || failure()
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
LAUNCH_ID: ${{ env.LAUNCH_ID }}
- name: Allure TestOps Launch Removal
run: bundle exec fastlane allure_launch_removal
if: cancelled()
env:
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
LAUNCH_ID: ${{ env.LAUNCH_ID }}
- name: Upload test results
uses: actions/[email protected]
if: failure()
with:
name: test_report
path: |
./**/build/reports/androidTests/*
fastlane/stream-chat-test-mock-server/logs/*