2022-02-27 23:15:00 +01:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
2022-02-27 23:55:42 +01:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'main'
|
|
|
|
pull_request:
|
2022-02-27 23:15:00 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
unit-tests:
|
|
|
|
name: Run all unit tests (with coverage)
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: actions/setup-java@v2
|
|
|
|
with:
|
|
|
|
distribution: 'adopt'
|
|
|
|
java-version: '11'
|
2022-03-26 10:56:59 +01:00
|
|
|
- uses: gradle/gradle-build-action@v2
|
2022-02-27 23:15:00 +01:00
|
|
|
|
2022-03-08 22:57:52 +01:00
|
|
|
- name: Create pip requirements
|
|
|
|
run: |
|
2022-09-15 21:28:41 +02:00
|
|
|
echo "matrix-synapse" > requirements.txt
|
2022-03-08 22:57:52 +01:00
|
|
|
|
2022-02-27 23:15:00 +01:00
|
|
|
- name: Set up Python 3.8
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: 3.8
|
2022-03-08 22:57:52 +01:00
|
|
|
cache: 'pip'
|
2022-02-27 23:15:00 +01:00
|
|
|
|
|
|
|
- name: Start synapse server
|
|
|
|
run: |
|
2022-03-08 22:57:52 +01:00
|
|
|
pip install -r requirements.txt
|
2022-03-08 22:54:29 +01:00
|
|
|
curl -sL https://gist.githubusercontent.com/ouchadam/e3ad09ec382bd91a66d88ab575ea7c31/raw/run.sh \
|
2022-02-27 23:15:00 +01:00
|
|
|
| bash -s -- --no-rate-limit
|
|
|
|
|
|
|
|
- name: Run all unit tests
|
2022-02-27 23:55:42 +01:00
|
|
|
run: ./gradlew clean allCodeCoverageReport --no-daemon
|
|
|
|
|
2022-02-27 23:15:00 +01:00
|
|
|
- uses: codecov/codecov-action@v2
|
|
|
|
with:
|
|
|
|
files: ./build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|