-
Notifications
You must be signed in to change notification settings - Fork 159
48 lines (40 loc) · 1.32 KB
/
build.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
name: Build
on:
push:
branches: [master, main]
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
name: Run flutter test and analyze
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Flutter environment
uses: subosito/flutter-action@v2.10.0
with:
channel: "stable"
- name: Setup Firebase
shell: bash
env:
FIREBASE_OPTIONS: ${{ secrets.FIREBASE_OPTIONS }}
ANDROID_GOOGLE_SERVICE: ${{ secrets.ANDROID_GOOGLE_SERVICE }}
IOS_GOOGLE_SERVICE: ${{ secrets.IOS_GOOGLE_SERVICE }}
run: |
echo "$FIREBASE_OPTIONS" > lib/firebase_options.dart
dart format lib/firebase_options.dart --line-length=100
echo "$ANDROID_GOOGLE_SERVICE" > android/app/google-services.json
echo "$IOS_GOOGLE_SERVICE" > ios/Runner/GoogleService-Info.plist
- name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed --line-length=100 .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Run flutter analyze
run: flutter analyze
- name: Run tests
run: flutter test