-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (76 loc) · 2.42 KB
/
code-analysis.yml
File metadata and controls
93 lines (76 loc) · 2.42 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@v4
with:
fetch-depth: 1
- name: make ssh directory
run: |
mkdir -p $HOME/.ssh/
- uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- uses: subosito/flutter-action@v2.18.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@v4
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@v4
with:
fetch-depth: 1
- uses: kuhnroyal/flutter-fvm-config-action@v3
id: fvm-config-action
- uses: subosito/flutter-action@v2.18.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@v4
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