-
Notifications
You must be signed in to change notification settings - Fork 16
57 lines (53 loc) · 2.04 KB
/
test_lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Test and Lint
on:
push:
paths:
- .github/workflows/test_lint.yml
- '*/src/**'
- gradle/**
- '**.gradle'
- gradle.properties
- gradlew*
jobs:
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up our JDK environment
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Update Play Public Key
run: echo 'PLAY_PUBLIC_KEY=${{ secrets.PLAY_PUBLIC_KEY }}' > ./local.properties
- name: Update Base Url
run: echo 'BASE_URL=${{ secrets.BASE_URL }}' > ./local.properties
- name: Update Firebase Base Url
run: echo 'BASE_URL_FIREBASE_CLOUD=${{ secrets.BASE_URL_FIREBASE_CLOUD }}' > ./local.properties
- name: Update Admob Full Screen AD Id
run: echo 'FULL_SCREEN_AD_ID=${{ secrets.FULL_SCREEN_AD_ID }}' > ./local.properties
- name: Update Admob AD Id
run: echo 'AD_ID_PROJECT=${{ secrets.AD_ID_PROJECT }}' > ./local.properties
- name: Update Add Weight Banner AD Id
run: echo 'ADD_WEIGHT_AD_ID=${{ secrets.ADD_WEIGHT_AD_ID }}' > ./local.properties
- name: Update Calendar Banner AD Id
run: echo 'CALENDAR_AD_ID=${{ secrets.CALENDAR_AD_ID }}' > ./local.properties
- name: Update Home Banner AD Id
run: echo 'HOME_AD_ID=${{ secrets.HOME_AD_ID }}' > ./local.properties
- name: Unit tests
run: bash ./gradlew test --stacktrace
- name: Unit tests results
uses: actions/upload-artifact@v1
with:
name: unit-tests-results
path: app/build/reports/tests/testDebugUnitTest/index.html
- name: build debug
run: ./gradlew assembleDebug
- name: upload artifact to Firebase App Distribution
uses: wzieba/Firebase-Distribution-Github-Action@v1
with:
appId: ${{secrets.FIREBASE_APP_ID}}
token: ${{secrets.FIREBASE_TOKEN}}
groups: testers
file: app/build/outputs/apk/debug/app-debug.apk