Skip to content

Commit 0cce848

Browse files
authored
Merge pull request #27 from studyplus/feature/master_unit_test
Add unit test on master branch
2 parents 8b95392 + 4d743af commit 0cce848

File tree

2 files changed

+36
-2
lines changed

2 files changed

+36
-2
lines changed

.github/workflows/pr_check.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: PR check
22

33
on: [pull_request]
44

@@ -72,4 +72,5 @@ jobs:
7272
./gradlew androidDependencies --no-daemon
7373
7474
- name: Run unit test
75-
run: ./gradlew studyplus-android-sdk:test
75+
run: |
76+
./gradlew studyplus-android-sdk:test --no-daemon

.github/workflows/unit_test.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Unit test
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
unit_test:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/[email protected]
14+
15+
- name: Gradle dist Cache
16+
uses: actions/[email protected]
17+
with:
18+
path: ~/.gradle/wrapper
19+
key: ${{ runner.os }}-dist-gradle-${{ hashFiles('**/gradle-wrapper.properties') }}
20+
- name: Gradle dependencies Cache
21+
uses: actions/[email protected]
22+
with:
23+
path: ~/.gradle/caches
24+
key: ${{ runner.os }}-v1-gradle-${{ hashFiles('**/build.gradle') }}
25+
restore-keys: |
26+
${{ runner.os }}-v1-gradle-
27+
- name: Download Dependencies
28+
run: |
29+
./gradlew androidDependencies --no-daemon
30+
31+
- name: Run unit test
32+
run: |
33+
./gradlew studyplus-android-sdk:test --no-daemon

0 commit comments

Comments
 (0)