-
-
Notifications
You must be signed in to change notification settings - Fork 890
164 lines (157 loc) · 4.8 KB
/
branch.yml
File metadata and controls
164 lines (157 loc) · 4.8 KB
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: "Branch & PR"
on:
push:
branches: [ '!master' ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
score-package:
name: "Score Package"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
cache: true
- name: Install pana
run: dart pub global activate pana
- name: Check package score
run: pana --exit-code-threshold 0 .
analyse-code:
name: "Analyse Code"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Flutter Environment
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Get All Dependencies
run: flutter pub get
- name: Check Formatting
run: dart format --output=none --set-exit-if-changed .
- name: Check Lints
run: dart analyze --fatal-infos --fatal-warnings
run-tests:
name: "Run Tests"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ '3.27.0', '' ]
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Flutter Environment
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
cache: true
- name: Run Tests with Coverage
run: flutter test -r expanded --coverage
- name: Run Codecov
if: ${{ matrix.sdk == '' }}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build-android:
name: "Build Android Example App"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ '3.27.0', '' ]
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Java 21 Environment
uses: actions/setup-java@v5
with:
distribution: "temurin"
java-version: "21"
cache: 'gradle'
- name: Setup Flutter Environment
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
cache: true
- name: Build Android Application
run: flutter build apk --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
- name: Archive Artifact
if: ${{ matrix.sdk == '' }}
uses: actions/upload-artifact@v5
with:
name: apk-build
path: example/build/app/outputs/apk/release
if-no-files-found: error
build-windows:
name: "Build Windows Example App"
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
sdk: [ '3.27.0', '' ]
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Flutter Environment
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
cache: true
- name: Build Windows Application
run: flutter build windows --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
- name: Install Inno Setup
if: ${{ matrix.sdk == '' }}
run: choco install innosetup --yes --no-progress
- name: Create Windows Application Installer
if: ${{ matrix.sdk == '' }}
run: iscc "windowsApplicationInstallerSetup.iss"
working-directory: .
- name: Archive Artifact
if: ${{ matrix.sdk == '' }}
uses: actions/upload-artifact@v5
with:
name: exe-build
path: windowsTemp/WindowsApplication.exe
if-no-files-found: error
build-web:
name: "Build Web Example App"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ '3.27.0', '' ]
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Flutter Environment
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.sdk }}
cache: true
- name: Build Web Application
run: flutter build web --wasm --dart-define=COMMIT_SHA=${{ github.sha }} --dart-define=flutter.flutter_map.unblockOSM="${{ secrets.UNBLOCK_OSM }}"
- name: Archive Artifact
uses: actions/upload-artifact@v5
if: ${{ matrix.sdk == '' }}
with:
name: web-build
path: example/build/web
if-no-files-found: error