2021-03-25 14:26:26 +03:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: {}
|
|
|
|
push:
|
2021-05-06 19:25:34 +03:00
|
|
|
branches: [main, develop]
|
2021-03-25 14:26:26 +03:00
|
|
|
|
2021-09-08 14:03:51 +03:00
|
|
|
# Enrich gradle.properties for CI/CD
|
|
|
|
env:
|
|
|
|
CI_GRADLE_ARG_PROPERTIES: >
|
|
|
|
-Porg.gradle.jvmargs=-Xmx2g
|
|
|
|
-Porg.gradle.parallel=false
|
|
|
|
|
2021-03-25 14:26:26 +03:00
|
|
|
jobs:
|
|
|
|
unit-tests:
|
2021-05-19 18:48:12 +03:00
|
|
|
name: Run Unit Tests
|
2021-03-25 14:26:26 +03:00
|
|
|
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
|
2021-09-08 14:03:51 +03:00
|
|
|
run: ./gradlew clean test $CI_GRADLE_ARG_PROPERTIES -PallWarningsAsErrors=false --stacktrace
|
|
|
|
- name: Publish Unit Test Results
|
|
|
|
uses: EnricoMi/publish-unit-test-result-action@v1
|
2021-09-24 11:14:57 +03:00
|
|
|
if: always() &&
|
|
|
|
github.event.sender.login != 'dependabot[bot]' &&
|
|
|
|
( github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository )
|
2021-09-08 14:03:51 +03:00
|
|
|
with:
|
|
|
|
files: ./**/build/test-results/**/*.xml
|