forked from wednesday-solutions/flutter_template
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.64 KB
/
ci.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
name: CI
on:
pull_request:
jobs:
lint-test-build-android:
name: Lint, Test And Build Android
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Setup app_secrets.dart
env:
APP_SECRETS: ${{ secrets.APP_SECRETS }}
APP_SECRETS_PATH: lib/secrets/app_secrets.dart
run: echo -n $APP_SECRETS | base64 --decode > $APP_SECRETS_PATH
- name: Get Dependencies
run: flutter pub get
- name: Run build_runner
run: flutter pub run build_runner build --delete-conflicting-outputs
- name: Lint
run: flutter analyze --fatal-infos --fatal-warnings
- name: Unit tests
run: flutter test --exclude-tags=golden
- name: Build Android
run: scripts/build.sh apk dev --debug
build-ios:
name: Golden Tests and Build iOS
runs-on: macos-latest
needs: [ lint-test-build-android ]
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Setup app_secrets.dart
env:
APP_SECRETS: ${{ secrets.APP_SECRETS }}
APP_SECRETS_PATH: lib/secrets/app_secrets.dart
run: echo -n $APP_SECRETS | base64 --decode > $APP_SECRETS_PATH
- name: Get Dependencies
run: flutter pub get
- name: Run build_runner
run: flutter pub run build_runner build
- name: Golden tests
run: flutter test --tags=golden test/presentation/goldens
- name: Build iOS
run: scripts/build.sh ios dev --debug --no-codesign