mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-17 02:15:17 +08:00
72 lines
2.2 KiB
YAML
72 lines
2.2 KiB
YAML
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=-Xmx2g
|
|
-Porg.gradle.parallel=false
|
|
|
|
jobs:
|
|
integration-tests:
|
|
name: Sanity Tests (Synapse)
|
|
runs-on: macos-latest
|
|
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 }}
|
|
script: |
|
|
./gradlew $CI_GRADLE_ARG_PROPERTIES \
|
|
-PallWarningsAsErrors=false \
|
|
connectedGplayDebugAndroidTest \
|
|
-Pandroid.testInstrumentationRunnerArguments.class=im.vector.app.ui.UiAllScreensSanityTest \
|
|
|| adb pull sdcard/Pictures/failure_screenshots
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
name: failure-screenshots
|
|
path: failure_screenshots
|
|
|