mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 03:16:02 +03:00
4d3f0d734e
Change-Id: I4ba951dbf6b6d874ac22d3f22f84bebb03f5e8bc
68 lines
2.3 KiB
YAML
68 lines
2.3 KiB
YAML
name: Integration Test
|
|
|
|
on:
|
|
pull_request: { }
|
|
push:
|
|
branches: [ main, develop ]
|
|
|
|
jobs:
|
|
# 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
|
|
|
|
integration-tests:
|
|
name: Integration Tests (Synapse)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
api-level: [21, 28, 30]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- 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 --no-rate-limit \
|
|
| sed s/127.0.0.1/0.0.0.0/g | bash
|
|
- name: Run integration tests on API ${{ matrix.api-level }}
|
|
uses: reactivecircus/android-emulator-runner@v2
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
# script: ./gradlew -PallWarningsAsErrors=false vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest
|
|
script: ./gradlew -PallWarningsAsErrors=false connectedCheck
|