Master build #57
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: Master build | |
on: | |
push: | |
branches: [ "master" ] | |
schedule: | |
- cron: '0 1 * * *' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Execute Lint | |
run: | | |
chmod +x ./gradlew | |
./gradlew lintDebug | |
- name: Upload Lint Reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lint-report | |
path: '**/build/reports/lint-results-*' | |
unit_tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Execute Tests | |
run: | | |
chmod +x ./gradlew | |
./gradlew testDebugUnitTest --continue | |
- name: Upload Test Reports | |
if: ${{ always() }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: test-reports | |
path: '**/build/reports/tests/' | |
assemble: | |
needs: [lint, unit_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/[email protected] | |
- name: Restore Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.gradle/caches | |
~/.gradle/wrapper | |
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }} | |
restore-keys: | | |
${{ runner.os }}-gradle- | |
- name: Assemble | |
run: | | |
chmod +x ./gradlew | |
./gradlew assembleDebug | |
- name: Upload APK | |
uses: actions/upload-artifact@v2 | |
with: | |
name: apk | |
path: app/build/outputs/apk/debug/**.apk |