Add unit tests #14
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: Android CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
lint: | |
name: RunLint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Grant execute permissions to gradlew | |
run: chmod +x gradlew | |
- name: Run lint | |
run: ./gradlew lint | |
- name: Upload lint report app | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lint_report_app | |
path: app/build/reports/tests/ | |
- name: Upload lint report module | |
uses: actions/upload-artifact@v2 | |
with: | |
name: lint_report_module | |
path: ceprace/build/reports/tests/ | |
unit-test: | |
name: RunTest | |
needs: | |
- lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Run tests | |
run: ./gradlew test | |
- name: Grant execute permissions to gradlew | |
run: chmod +x gradlew | |
- name: Upload test report app | |
uses: actions/upload-artifact@v2 | |
with: | |
name: unit_test_report_app | |
path: app/build/reports/tests/testDebugUnitTest/ | |
- name: Upload test report module | |
uses: actions/upload-artifact@v2 | |
with: | |
name: unit_test_report_module | |
path: ceprace/build/reports/tests/testDebugUnitTest/ |