-
Notifications
You must be signed in to change notification settings - Fork 520
62 lines (47 loc) · 1.54 KB
/
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
name: prepare
on:
workflow_dispatch:
pull_request:
branches: [master]
jobs:
main:
name: Flutter ${{ matrix.flutter-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flutter-version: ["3.10.x", "3.13.x", "3.16.x", "3.19.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: flutter pub get
run: flutter pub get
- name: dart format
run: dart format --set-exit-if-changed .
- name: flutter analyze
run: flutter analyze --no-fatal-infos
- name: flutter test
run: flutter test
- name: ktlint check
working-directory: example/android
run: ./gradlew flutter_downloader:ktlintCheck
- name: flutter pub get (example app)
working-directory: ./example
run: flutter pub get
- name: flutter format (example app)
working-directory: ./example
run: dart format --set-exit-if-changed .
- name: flutter analyze (example app)
working-directory: ./example
run: flutter analyze --no-fatal-infos
- name: flutter test (example app)
working-directory: ./example
run: flutter test
- name: Dry run pub publish
# We don't want it to fail the CI, it's just to see how would `pub publish` behave.
run: dart pub publish --dry-run || true