element-android-Github/.github/workflows/integration.yml

50 lines
1.6 KiB
YAML
Raw Normal View History

2021-05-07 00:24:00 +08:00
name: Integration Test
2021-03-27 04:20:06 +08:00
on:
pull_request: { }
push:
2021-05-07 00:25:34 +08:00
branches: [ main, develop ]
2021-03-27 04:20:06 +08:00
jobs:
integration-tests:
2021-03-27 06:52:06 +08:00
name: Integration Tests (Synapse)
2021-03-27 04:20:06 +08:00
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [21, 30]
2021-03-27 04:20:06 +08:00
steps:
- uses: actions/checkout@v2
2021-03-27 04:37:08 +08: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-27 04:20:06 +08: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-27 04:37:08 +08:00
- 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 \
2021-03-27 04:37:08 +08:00
| sed s/127.0.0.1/0.0.0.0/g | bash
- name: Run integration tests on API ${{ matrix.api-level }}
2021-03-30 21:11:55 +08:00
uses: reactivecircus/android-emulator-runner@v2
2021-03-30 21:14:26 +08:00
with:
api-level: ${{ matrix.api-level }}
2021-05-20 00:16:05 +08:00
# script: ./gradlew -PallWarningsAsErrors=false vector:connectedAndroidTest matrix-sdk-android:connectedAndroidTest
script: ./gradlew -PallWarningsAsErrors=false connectedCheck