mirror of
https://github.com/ouchadam/small-talk.git
synced 2024-12-15 11:28:38 +01:00
e792264b3c
Adding CI pipelines for assembly and testing
54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'main'
|
|
pull_request:
|
|
|
|
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/cache@v2
|
|
with:
|
|
path: |
|
|
~/.gradle/caches
|
|
~/.gradle/wrapper
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
|
|
- uses: actions/setup-java@v2
|
|
with:
|
|
distribution: 'adopt'
|
|
java-version: '11'
|
|
|
|
- name: Set up Python 3.8
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.8
|
|
|
|
- name: Start synapse server
|
|
run: |
|
|
pip install matrix-synapse
|
|
curl -sL https://raw.githubusercontent.com/matrix-org/synapse/develop/demo/start.sh \
|
|
| bash -s -- --no-rate-limit
|
|
|
|
- name: Run all unit tests
|
|
run: ./gradlew clean allCodeCoverageReport --no-daemon
|
|
|
|
- name: Print coverage size
|
|
run: ls -l ./build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|
|
|
|
- uses: codecov/codecov-action@v2
|
|
with:
|
|
files: ./build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|