-
Notifications
You must be signed in to change notification settings - Fork 3
86 lines (79 loc) · 2.21 KB
/
app.yml
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: App
on:
push:
paths:
- '.github/workflows/app.yml'
- 'app/**'
defaults:
run:
working-directory: ./app
env:
JAVA_VERSION: 12.x
FLUTTER_CHANNEL: stable
FLUTTER_VERSION: 3.7.6
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- uses: subosito/flutter-action@v2
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: flutter pub get
- run: flutter pub run build_runner build
- run: flutter analyze
build-android:
name: Build Android APK
needs: [lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- uses: subosito/flutter-action@v1
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: flutter pub get
- run: flutter pub run build_runner build
- run: flutter build apk
build-ios:
name: Build iOS Package
needs: [lint]
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: ${{ env.JAVA_VERSION }}
- uses: subosito/flutter-action@v1
with:
channel: ${{ env.FLUTTER_CHANNEL }}
flutter-version: ${{ env.FLUTTER_VERSION }}
- run: flutter pub get
- run: flutter pub run build_runner build
- run: flutter build ios --release --no-codesign
test:
name: Test
needs: [lint, build-android, build-ios]
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
- run: flutter pub get
- run: flutter pub run build_runner build
- run: open -a Simulator.app
- run: flutter test integration_test -d iPhone --coverage
- uses: codecov/codecov-action@v3
with:
flags: app
directory: app/coverage