-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (76 loc) · 2.77 KB
/
code-analysis.yml
File metadata and controls
93 lines (76 loc) · 2.77 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
name: code-analysis
on:
push:
paths:
- 'lib/**.dart'
- 'example/**.dart'
- 'pubspec.yaml'
- 'pubspec.lock'
- '.github/workflows/code-analysis.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- name: make ssh directory
run: |
mkdir -p $HOME/.ssh/
- uses: kuhnroyal/flutter-fvm-config-action@c378498f1d1962d33039c3989411093ef8a17b2c # v3.3
id: fvm-config-action
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache: true
- name: restore pubspec dependencies cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: pubspec_cache_id
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
- name: install dependencies
if: ${{ steps.pubspec_cache_id.outputs.cache-hit != 'true' }}
run: flutter pub get
lint:
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: setup
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 1
- uses: kuhnroyal/flutter-fvm-config-action@c378498f1d1962d33039c3989411093ef8a17b2c # v3.3
id: fvm-config-action
- uses: subosito/flutter-action@1a449444c387b1966244ae4d4f8c696479add0b2 # v2.23.0
with:
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache: true
- name: restore pubspec dependencies cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
id: pubspec_cache_id
with:
path: |
${{ env.FLUTTER_HOME }}/.pub-cache
**/.packages
**/.flutter-plugins
**/.flutter-plugin-dependencies
**/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles('**/pubspec.lock') }}
- name: dart format
run: dart format --set-exit-if-changed lib test
- name: flutter analyze
run: flutter analyze lib test
- name: custom lint
run: cd example && dart run custom_lint