-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.28 KB
/
android_unittest.yml
File metadata and controls
50 lines (42 loc) · 1.28 KB
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
name: Android Unit Test
on:
push:
branches:
- main
- dev/*
jobs:
test:
runs-on: ubuntu-latest
steps:
# チェックアウト
- uses: actions/checkout@v3
# JDKのセットアップ
- name: set up JDK 11
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
# Gradleのキャッシュ復元
- uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
# google-services.jsonのコピー
- name: copy google-service
env:
GOOGLE_SERVICE: ${{ secrets.GOOGLE_SERVICE_JSON }}
run: echo $GOOGLE_SERVICE | base64 --decode --ignore-garbage > ./app/google-services.json
# 実行権限付与
- name: Make gradlew executable
run: chmod +x ./gradlew
# テスト
- name: Test with Gradle
run: ./gradlew test
# JUnit Report Action
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3.8.0
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/build/test-results/*/TEST-*.xml'