-
Notifications
You must be signed in to change notification settings - Fork 17
81 lines (78 loc) · 2.68 KB
/
unit_test.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
# This is a basic workflow to help you get started with Actions
name: Test
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main, feature/* ]
pull_request:
branches: [ main, feature/* ]
jobs:
build-ios-debug:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Prepare firebase config
run: make secret
env:
FILE_FIREBASE_IOS_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_IOS_DEVELOPMENT }}
FILE_FIREBASE_IOS_PRODUCTION: ${{ secrets.FILE_FIREBASE_IOS_PRODUCTION }}
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
- run: flutter pub get
- name: Run iOS
run: flutter build ios --debug --no-codesign --target lib/main.dev.dart --dart-define-from-file=environment/dev.json
build-android-debug:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- name: Prepare firebase config
run: make secret
env:
FILE_FIREBASE_ANDROID_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_ANDROID_DEVELOPMENT }}
FILE_FIREBASE_ANDROID_PRODUCTION: ${{ secrets.FILE_FIREBASE_ANDROID_PRODUCTION }}
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
- run: flutter pub get
- run: flutter build apk --debug --target lib/main.dev.dart --dart-define-from-file=environment/dev.json
test:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
- run: make secret
- run: flutter pub get
- run: flutter test
codegen:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.10.6'
- run: make secret
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: git diff --quiet --exit-code