Skip to content

test: add application test #203

test: add application test

test: add application test #203

Workflow file for this run

name: Build & Test
on:
push:
branches: [ main, 'feat/**', 'chore/**', 'fix/**' ]
jobs:
test:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2.4.2
- name: set up JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'adopt'
cache: gradle
- name: Create google-services.json
run: |
echo '${{ secrets.FIREBASE_GOOGLE_SERVICES_JSON }}' > app/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check & Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew createDebugCoverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
files: "feature/playlist/presentation/build/reports/jacoco/createDebugCoverage/createDebugCoverage.xml,feature/catalog/presentation/build/reports/jacoco/createDebugCoverage/createDebugCoverage.xml,data/build/reports/jacoco/createDebugCoverage/createDebugCoverage.xml,features/player/presentation/build/reports/jacoco/createDebugCoverage/createDebugCoverage.xml,core/design/build/reports/jacoco/createDebugCoverage/createDebugCoverage.xml,core/design/build/reports/coverage/androidTest/debug/connected/report.xml,feature/player/presentation/build/reports/coverage/androidTest/debug/connected/report.xml,data/build/reports/coverage/androidTest/debug/connected/report.xml"
- name: Upload test report artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: sleep-app-test-report
path: /home/runner/work/sleep/sleep/app/build/reports/lint-results-debug.html