Skip to content

Commit db9c2b1

Browse files
committed
fix github action
1 parent 909b669 commit db9c2b1

File tree

1 file changed

+14
-19
lines changed

1 file changed

+14
-19
lines changed

.github/workflows/android-unit-test.yml

+14-19
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,27 @@ name: Android Unit Test
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
78

89
jobs:
9-
build:
10+
test-feature:
11+
runs-on: macOS-latest
1012

11-
runs-on: ubuntu-latest
13+
needs: build
1214

1315
steps:
1416
- name: Checkout code
15-
uses: actions/checkout@v2
16-
17-
- name: Set up JDK 8
18-
uses: actions/setup-java@v2
17+
uses: actions/checkout@v4.1.0
18+
- name: Set up JDK 11
19+
uses: actions/setup-java@v3.13.0
1920
with:
2021
distribution: 'adopt'
21-
java-version: '8'
22-
23-
- name: Grant execute permission for gradlew
24-
run: chmod +x gradlew
22+
java-version: '18'
2523

26-
- name: Build and run unit tests
27-
run: ./gradlew testDebug
24+
- name: Grant execute permissions for gradlew
25+
run: chmod +x ./gradlew
2826

29-
- name: Upload test results
30-
uses: actions/upload-artifact@v2
31-
with:
32-
name: test-results
33-
path: app/build/test-results
27+
- name: Run Tests with Gradle
28+
run: ./gradlew test

0 commit comments

Comments
 (0)