forked from aws-amplify/amplify-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.46 KB
/
flutter_android.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
name: Flutter Android
on:
workflow_call:
inputs:
working-directory:
description: The working directory relative to the repo root
required: true
type: string
package-name:
description: The name of the app-facing package being tested
required: true
type: string
jobs:
test:
name: Test
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
# Allows other matrix items to run if one fails
fail-fast: false
matrix:
sdk:
- stable
- beta
steps:
- name: Git Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0
- name: Git Submodules
run: git submodule update --init
- name: Setup Flutter
uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d # 2.8.0
with:
cache: true
channel: ${{ matrix.sdk }}
- name: Setup aft
run: flutter pub global activate -spath packages/aft
- name: Update constraints
if: matrix.sdk == 'beta'
shell: bash
run: aft --config=aft.beta.yaml constraints apply
- name: Bootstrap
id: bootstrap
timeout-minutes: 10
run: aft bootstrap
- name: Run Android unit tests
run: |
flutter build apk --debug --verbose
./gradlew :"${{ inputs.package-name}}":testDebugUnitTest
working-directory: ${{ inputs.working-directory }}