-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.31 KB
/
flutter_main.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Flutter CI for main branch pull requests
on:
push:
branches: [ "main" ]
paths-ignore:
- '**.md'
- '.git/'
- '.vscode/'
pull_request:
branches: [ "main" ]
types:
- opened
- reopened
- synchronize
- ready_for_review
paths-ignore:
- '**.md'
- '.git/'
- '.vscode/'
jobs:
build:
runs-on: macos-latest
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Setup FVM
uses: kuhnroyal/flutter-fvm-config-action@v1
id: fvm-config-action
- name: Setup Flutter
uses: subosito/flutter-action@v2
id: setup-flutter
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: true
cache-key: 'flutter-:os:-:channel:-:version:-:arch:-:hash:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:-:arch:'
architecture: x64
- name: Install Dependencies
run: |
flutter config --no-analytics
flutter pub get
- name: Check Formatting
run: dart format . --set-exit-if-changed
- name: Checking the correctness of the build_runner build and localizations
run: |
dart run build_runner build --delete-conflicting-outputs --verbose
flutter pub run intl_utils:generate
git diff
git status --porcelain
git status --porcelain|wc -l
(( $(git status --porcelain|wc -l) == 0 )) || { echo >&2 "Some changes in generated files detected"; exit 1; }
- name: Analyze
run: flutter analyze . --fatal-infos
# - name: Run tests
# run: flutter test --machine | tojunit -o report.xml
- name: Publish test reports
uses: mikepenz/action-junit-report@v4
if: success() || failure()
with:
report_paths: '**/report.xml'
# - name: Build app
# run: |
# flutter build apk --dart-define "ENVIRONMENT=PRODUCTION" --flavor production
# flutter build appbundle --dart-define "ENVIRONMENT=PRODUCTION" --flavor production
# flutter build ipa --dart-define "ENVIRONMENT=PRODUCTION" --flavor production --no-codesign