Merge pull request #188 from weblate/weblate-vacation-days-vacation-days #349
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "📥 Check-out" | |
uses: actions/checkout@v2 | |
- name: "🧪 Gradle Wrapper Validation" | |
uses: gradle/wrapper-validation-action@v1 | |
- name: "🧰 Install JDK" | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'adopt' | |
java-version: 11 | |
java-package: jdk | |
- name: "🧰 Setup Android SDK" | |
uses: android-actions/setup-android@v2 | |
- name: "🦸 Make gradlew executable" | |
run: chmod +x ./gradlew | |
- name: "🏗 Build" | |
run: ./gradlew assembleDebug | |
- name: "🧪 Code coverage" | |
run: ./gradlew clean jacocoTestReport | |
- name: "🧪 Generate report" | |
uses: actions/upload-artifact@v3 | |
with: | |
name: report | |
path: ${{ github.workspace }}/app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml | |
- name: "🧪 Download Test Reports Folder" | |
uses: actions/download-artifact@v3 | |
with: | |
name: report | |
path: ${{ github.workspace }}/app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml | |
- name: Submit Coverage | |
# This can fail on timeouts etc, wrap with retry | |
uses: nick-invision/retry@v2 | |
with: | |
timeout_minutes: 10 | |
retry_wait_seconds: 60 | |
max_attempts: 3 | |
command: curl https://codecov.io/bash -o codecov.sh && bash ./codecov.sh -f "${{ github.workspace }}/app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml" | |
- name: "🧪 Android LINT" | |
run: ./gradlew lint | |
- name: "🧪 Unit test" | |
run: ./gradlew test |