2021-05-06 19:24:00 +03:00
|
|
|
name: Integration Test
|
2021-03-26 23:20:06 +03:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: { }
|
|
|
|
push:
|
2021-05-06 19:25:34 +03:00
|
|
|
branches: [ main, develop ]
|
2021-03-26 23:20:06 +03:00
|
|
|
|
2021-09-08 14:03:51 +03:00
|
|
|
# Enrich gradle.properties for CI/CD
|
|
|
|
env:
|
|
|
|
CI_GRADLE_ARG_PROPERTIES: >
|
|
|
|
-Porg.gradle.jvmargs=-Xmx2g
|
|
|
|
-Porg.gradle.parallel=false
|
|
|
|
|
2021-03-26 23:20:06 +03:00
|
|
|
jobs:
|
2021-09-03 11:29:22 +03:00
|
|
|
# Temporary add build of Android tests, which cannot be run on the CI right now, but they need to at least compile
|
|
|
|
# So it will be mandatory for this action to be successful on every PRs
|
|
|
|
compile-android-test:
|
|
|
|
name: Compile Android tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- 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: Compile Android tests
|
2021-09-08 14:03:51 +03:00
|
|
|
run: ./gradlew clean assembleAndroidTest $CI_GRADLE_ARG_PROPERTIES --stacktrace -PallWarningsAsErrors=false
|
2021-09-03 11:29:22 +03:00
|
|
|
|
2021-03-26 23:20:06 +03:00
|
|
|
integration-tests:
|
2021-03-27 01:52:06 +03:00
|
|
|
name: Integration Tests (Synapse)
|
2021-03-26 23:20:06 +03:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-19 18:45:47 +03:00
|
|
|
strategy:
|
2021-08-03 17:12:51 +03:00
|
|
|
fail-fast: false
|
2021-05-19 18:45:47 +03:00
|
|
|
matrix:
|
2021-09-14 19:17:24 +03:00
|
|
|
api-level: [28]
|
2021-03-26 23:20:06 +03:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-09-08 14:03:51 +03:00
|
|
|
- uses: gradle/wrapper-validation-action@v1
|
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: 11
|
2021-03-26 23:37:08 +03:00
|
|
|
- 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 }}-
|
2022-01-03 13:45:05 +03:00
|
|
|
- uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.gradle/caches
|
|
|
|
~/.gradle/wrapper
|
|
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gradle-
|
2021-03-26 23:37:08 +03:00
|
|
|
- name: Start synapse server
|
|
|
|
run: |
|
2022-01-03 13:45:05 +03:00
|
|
|
python3 -m venv .synapse
|
|
|
|
source .synapse/bin/activate
|
|
|
|
pip install synapse matrix-synapse
|
2022-01-03 19:12:16 +03:00
|
|
|
curl https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh -o start.sh
|
2022-01-03 19:24:43 +03:00
|
|
|
chmod 777 start.sh
|
2022-01-03 19:21:52 +03:00
|
|
|
./start.sh --no-rate-limit
|
2022-01-03 13:45:05 +03:00
|
|
|
- name: Run integration tests on API ${{ matrix.api-level }}
|
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
|
|
with:
|
|
|
|
api-level: ${{ matrix.api-level }}
|
|
|
|
#arch: x86_64
|
|
|
|
#disable-animations: true
|
|
|
|
# script: ./gradlew -PallWarningsAsErrors=false vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest
|
|
|
|
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
|
2022-01-04 01:46:23 +03:00
|
|
|
# script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false connectedCheck --stacktrace
|
|
|
|
script: ./gradlew $CI_GRADLE_ARG_PROPERTIES -Pandroid.testInstrumentationRunnerArguments.class=org.matrix.android.sdk.session.room.threads.ThreadMessagingTest matrix-sdk-android:connectedAndroidTest --info
|
2022-01-04 01:30:51 +03:00
|
|
|
|
2022-01-04 01:49:39 +03:00
|
|
|
|