-
Notifications
You must be signed in to change notification settings - Fork 5
116 lines (89 loc) · 2.56 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
name: CI
on:
pull_request:
push:
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Dart
uses: dart-lang/setup-dart@v1
- name: Format
run: dart format --output=none --set-exit-if-changed \
$(find . -name '*.dart' -not -name '*.g.dart' -and -not -name '*.freezed.dart')
analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Analyze
uses: invertase/github-action-dart-analyzer@v3
with:
fatal-infos: true
custom-lint: true
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Test
run: flutter test
integration-test-ios:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
run: flutter pub get
- name: Start simulator
uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 14'
- name: Integration test
run: flutter test integration_test
check-i18n-sorting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get changed i18n files
id: changed-i18n-files
uses: tj-actions/changed-files@v44
with:
files: lib/i18n/aria/*.i18n.yaml
- name: Install Flutter
if: steps.changed-i18n-files.outputs.any_changed == 'true'
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Get dependencies
if: steps.changed-i18n-files.outputs.any_changed == 'true'
run: flutter pub get
- name: Compare i18n files
if: steps.changed-i18n-files.outputs.any_changed == 'true'
env:
ALL_CHANGED_FILES: ${{ steps.changed-i18n-files.outputs.all_changed_files }}
run: |
for file in $ALL_CHANGED_FILES; do
cp $file $file.copy
dart run script/sort_yaml.dart $file
cmp $file $file.copy
done