Files
Mealient/.github/workflows/check.yml
2022-06-05 15:43:06 +02:00

37 lines
1.0 KiB
YAML

name: Check
on: [ pull_request ]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
- name: Cache Gradle packages
uses: actions/cache@v1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Run tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew check jacocoTestReportDebug jacocoTestReportRelease sonarqube --no-daemon
- name: Publish test reports
uses: mikepenz/action-junit-report@v2
if: always() # always run even if the previous step fails
with:
report_paths: './**/build/test-results/**/TEST-*.xml'