mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-27 11:28:33 +03:00
e4f36f17a2
Change-Id: I54c9b9df50bd6fb4b8cde241701c4f3e3ecb92cb
36 lines
1.1 KiB
YAML
36 lines
1.1 KiB
YAML
name: Test
|
|
|
|
on:
|
|
pull_request: {}
|
|
push:
|
|
branches: [main, develop]
|
|
|
|
# Enrich gradle.properties for CI/CD
|
|
env:
|
|
CI_GRADLE_ARG_PROPERTIES: >
|
|
-Porg.gradle.jvmargs=-Xmx2g
|
|
-Porg.gradle.parallel=false
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Run Unit 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: Run unit tests
|
|
run: ./gradlew clean test $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false --stacktrace
|
|
- name: Publish Unit Test Results
|
|
uses: EnricoMi/publish-unit-test-result-action@v1
|
|
if: always() &&
|
|
github.event.sender.login != 'dependabot[bot]' &&
|
|
( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
|
|
with:
|
|
files: ./**/build/test-results/**/*.xml
|