mirror of
https://github.com/ouchadam/small-talk.git
synced 2024-12-22 07:55:36 +01:00
adding test workflow
This commit is contained in:
parent
c78d24a458
commit
a3dea5ddc6
35
.github/workflows/assemble.yml
vendored
Normal file
35
.github/workflows/assemble.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
name: Assemble Debug
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
assemble-debug:
|
||||
name: Assemble debug variant
|
||||
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: Assemble debug variant
|
||||
run: ./gradlew assembleDebug --no-daemon
|
53
.github/workflows/test.yml
vendored
Normal file
53
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Test
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: ["Assemble Debug"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
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
|
||||
with:
|
||||
ref: ${{ github.event.workflow_run.head_branch }}
|
||||
|
||||
- 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 allCodeCoverageReport --no-configuration-cache --no-daemon
|
||||
|
||||
- uses: codecov/codecov-action@v2
|
||||
with:
|
||||
files: ./build/reports/jacoco/allCodeCoverageReport/allCodeCoverageReport.xml
|
Loading…
Reference in New Issue
Block a user