2021-05-06 18:24:00 +02:00
|
|
|
name: Integration Test
|
2021-03-26 21:20:06 +01:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: { }
|
|
|
|
push:
|
2021-05-06 18:25:34 +02:00
|
|
|
branches: [ main, develop ]
|
2021-03-26 21:20:06 +01:00
|
|
|
|
|
|
|
jobs:
|
2021-09-03 10:29:22 +02: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
|
|
|
|
run: ./gradlew clean assembleAndroidTest --stacktrace -PallWarningsAsErrors=false
|
|
|
|
|
2021-03-26 21:20:06 +01:00
|
|
|
integration-tests:
|
2021-03-26 23:52:06 +01:00
|
|
|
name: Integration Tests (Synapse)
|
2021-03-26 21:20:06 +01:00
|
|
|
runs-on: ubuntu-latest
|
2021-05-19 17:45:47 +02:00
|
|
|
strategy:
|
2021-08-03 16:12:51 +02:00
|
|
|
fail-fast: false
|
2021-05-19 17:45:47 +02:00
|
|
|
matrix:
|
2021-08-31 14:20:39 +02:00
|
|
|
api-level: [21, 28, 30]
|
2021-03-26 21:20:06 +01:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2021-03-26 21:37:08 +01: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 }}-
|
2021-03-26 21:20:06 +01: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 21:37:08 +01:00
|
|
|
- name: Start synapse server
|
|
|
|
run: |
|
|
|
|
python3 -m venv .synapse
|
|
|
|
source .synapse/bin/activate
|
|
|
|
pip install synapse matrix-synapse
|
2021-05-19 17:45:47 +02:00
|
|
|
curl -sL https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh --no-rate-limit \
|
2021-03-26 21:37:08 +01:00
|
|
|
| sed s/127.0.0.1/0.0.0.0/g | bash
|
2021-05-19 17:45:47 +02:00
|
|
|
- name: Run integration tests on API ${{ matrix.api-level }}
|
2021-03-30 15:11:55 +02:00
|
|
|
uses: reactivecircus/android-emulator-runner@v2
|
2021-03-30 15:14:26 +02:00
|
|
|
with:
|
2021-05-19 17:45:47 +02:00
|
|
|
api-level: ${{ matrix.api-level }}
|
2021-05-19 18:16:05 +02:00
|
|
|
# script: ./gradlew -PallWarningsAsErrors=false vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest
|
|
|
|
script: ./gradlew -PallWarningsAsErrors=false connectedCheck
|