forked from Lyokone/flutterlocation
-
Notifications
You must be signed in to change notification settings - Fork 1
95 lines (73 loc) · 2.21 KB
/
location-prepare.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: location prepare
on:
pull_request:
branches: [master, develop]
jobs:
prepare-flutter:
name: Flutter ${{ matrix.flutter-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter-version: ["3.22.x"]
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: ${{ matrix.flutter-version }}
- name: Set up Melos
run: dart pub global activate melos ^3.0.0
- name: melos bootstrap
run: melos bootstrap
- name: Check code formatting
if: success() || failure()
run: melos run format --no-select
- name: Run analyzer
if: success() || failure()
run: melos run analyze --no-select
- name: Run tests
if: success() || failure()
run: melos run test --no-select
prepare-android:
name: Android
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.x
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Build example app
working-directory: packages/location/example
run: flutter build apk --debug
- name: Run ktlint
working-directory: packages/location/example/android
run: ./gradlew :location:ktlintCheck
prepare-ios:
name: iOS
runs-on: macos-latest
steps:
- name: Clone repository
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.22.x
- name: Install tools
run: brew install clang-format
- name: clang-format
working-directory: packages/location/ios
run: |
find . -iname '*.h' -o -iname '*.m' | xargs -I {} clang-format --dry-run --Werror {}
- name: Build example app
working-directory: packages/location/example
run: flutter build ios --debug --simulator