-
Notifications
You must be signed in to change notification settings - Fork 64
104 lines (100 loc) · 2.99 KB
/
checks.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
name: Check
on:
# Curently, this workflow is triggered by pull request events only.
# Uncomment the following line to run this workflow on push events
# push:
# branches:
# - main
pull_request:
branches:
- main
jobs:
flutter-analyze:
name: flutter analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: '3.13.0' # Uses the minimum supported version.
channel: stable
- name: Install DCM
uses: CQLabs/setup-dcm@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Get Flutter version
- name: Get Flutter version
run: flutter --version
# Get dependencies
- name: Get dependencies
run: flutter pub get
# Setup Melos
- name: Setup Melos
run: dart pub global activate melos
# Run Melos bootstrap
- name: Melos bootstrap
run: melos bootstrap
# Run flutter analyze for the main package
- name: Run flutter analyze
run: flutter analyze
- name: Check if flutter analyze passes
run: echo $?
# Run melos analyze to find analzyer issues using DCM.dev for both Flutter and Dart
- name: Run melos analyze
run: melos analyze
- name: Check if melos analyze passes
run: echo $?
dart-format:
name: dart format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: '3.13.0' # Uses the minimum supported version.
channel: stable
# Get Flutter version
- name: Get Flutter version
run: flutter --version
# Get dependencies
- name: Get dependencies
run: flutter pub get
# Setup Melos
- name: Setup Melos
run: dart pub global activate melos
# Run Melos bootstrap
- name: Melos bootstrap
run: melos bootstrap
# CHeck if there are format issues
- name: Run dart format
run: dart format --set-exit-if-changed .
# Run melos format to find format issues in demos
- name: Run melos format
run: melos format
- name: Check if melos analyze passes
run: echo $?
flutter-test:
name: flutter test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/[email protected]
with:
flutter-version: '3.13.0' # Uses the minimum supported version.
channel: stable
# Get Flutter version
- name: Get Flutter version
run: flutter --version
# Get dependencies
- name: Get dependencies
run: flutter pub get
# Setup Melos
- name: Setup Melos
run: dart pub global activate melos
# Run Melos bootstrap
- name: Melos bootstrap
run: melos bootstrap
- name: Run tests
run: flutter test
- name: Check if flutter test passes
run: echo $?