Sanity Test #924
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sanity Test | |
on: | |
schedule: | |
# At 20:00 every day UTC | |
- cron: '0 20 * * *' | |
# Enrich gradle.properties for CI/CD | |
env: | |
CI_GRADLE_ARG_PROPERTIES: > | |
-Porg.gradle.jvmargs=-Xmx4g | |
-Porg.gradle.parallel=false | |
jobs: | |
integration-tests: | |
name: Sanity Tests (Synapse) | |
runs-on: macos-latest | |
if: ${{ false }} | |
strategy: | |
fail-fast: false | |
matrix: | |
api-level: [ 28 ] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: develop | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Cache pip | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip | |
restore-keys: | | |
${{ runner.os }}-pip- | |
${{ runner.os }}- | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Start synapse server | |
run: | | |
python3 -m venv .synapse | |
source .synapse/bin/activate | |
pip install synapse matrix-synapse | |
curl -sL https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh \ | |
| sed s/127.0.0.1/0.0.0.0/g | sed 's/http:\/\/localhost/http:\/\/10.0.2.2/g' | bash -s -- --no-rate-limit | |
- uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Run sanity tests on API ${{ matrix.api-level }} | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: ${{ matrix.api-level }} | |
arch: x86 | |
profile: Nexus 5X | |
force-avd-creation: false | |
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none | |
emulator-build: 7425822 # workaround to emulator bug: https://github.com/ReactiveCircus/android-emulator-runner/issues/160 | |
script: | | |
adb root | |
adb logcat -c | |
touch emulator.log | |
chmod 777 emulator.log | |
adb logcat >> emulator.log & | |
./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedGplayBtchapWithoutvoipWithoutpinningDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest || adb pull storage/emulated/0/Pictures/failure_screenshots && exit 1 | |
- name: Upload Test Report Log | |
uses: actions/upload-artifact@v2 | |
if: always() | |
with: | |
name: sanity-error-results | |
path: | | |
emulator.log | |
failure_screenshots/ |