This repository has been archived by the owner on Dec 19, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
69 lines (57 loc) · 1.87 KB
/
android_workflow.yaml
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
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Android CI
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
paths:
- .github/workflows/android_workflow.yaml
- newsfeed_android/**
# Declare default permissions as read only.
permissions: read-all
defaults:
run:
working-directory: ./newsfeed_android
jobs:
build:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.platform }}
name: build / ${{ matrix.platform }}
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: subosito/flutter-action@2783a3f08e1baf891508463f8c6653c258246225
with:
channel: "stable"
- run: flutter --version
- name: Build Flutter AAR file
working-directory: flutter_nps
run: flutter build aar
- name: Set up JDK
uses: actions/setup-java@387ac29b308b003ca37ba93a6cab5eb57c8f5f93
with:
distribution: "zulu"
java-version: "17"
- name: Change wrapper permissions
working-directory: ./newsfeed_android
run: chmod +x ./gradlew
- name: Android linter
run: ./gradlew lint
continue-on-error: false
- name: Run Checkstyle
uses: dbelyaev/action-checkstyle@ee2055a5f301a522c38c51ef80a5ff547fea39c8
if: matrix.platform == 'ubuntu-latest'
with:
github_token: ${{ secrets.github_token }}
- name: Build with Gradle
run: ./gradlew build
- name: Run Android Unit Test
run: ./gradlew testDebugUnitTest
- name: Run Android Instrumented tests
if: matrix.platform == 'macos-latest'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b
with:
working-directory: ./newsfeed_android
api-level: 29
script: ./gradlew connectedCheck