-
-
Notifications
You must be signed in to change notification settings - Fork 122
53 lines (45 loc) · 1.68 KB
/
commit_check.yml
File metadata and controls
53 lines (45 loc) · 1.68 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
name: Commit Guard
on:
push:
branches:
- '!master'
pull_request:
# Run on any TARGET branches.
branches: [ '**' ]
jobs:
commit_check:
name: Check commit
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: checkout all the submodules
uses: actions/checkout@v6
with:
submodules: recursive
fetch-depth: 0
# Check if commit contains any changes under /lib, /test or /integration_test dir.
- name: Detect Flutter code changes
id: changes
uses: dorny/paths-filter@v4
with:
filters: |
flutter:
- 'lib/**'
- 'test/**'
- 'integration_test/**'
- 'pubspec.yaml'
- name: Flutter doctor
if: steps.changes.outputs.flutter == 'true' || steps.changes.outputs.unitTests == 'true'
run: submodules/flutter/bin/flutter doctor
- name: Flutter pub get
if: steps.changes.outputs.flutter == 'true' || steps.changes.outputs.unitTests == 'true'
run: submodules/flutter/bin/flutter pub get
- name: Flutter format
if: steps.changes.outputs.flutter == 'true' || steps.changes.outputs.unitTests == 'true'
run: submodules/flutter/bin/dart format --set-exit-if-changed lib test integration_test
- name: Flutter analyze
if: steps.changes.outputs.flutter == 'true' || steps.changes.outputs.unitTests == 'true'
run: submodules/flutter/bin/flutter analyze lib test integration_test
- name: Flutter test
if: steps.changes.outputs.flutter == 'true' || steps.changes.outputs.unitTests == 'true'
run: submodules/flutter/bin/flutter test