-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (57 loc) · 1.64 KB
/
analysis.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
name: Analyze
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
analyze-dart:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
- name: Pub cache
uses: actions/cache@v4
env:
CACHE_NAME: firebase_js_interop
with:
path: ${{ env.PUB_CACHE }}
key: pub-cache-${{ env.CACHE_NAME }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: pub-cache-${{ env.CACHE_NAME }}-
- name: Install puby
run: dart pub global activate puby
- name: Pub get
run: puby link
- name: Format
run: dart format --set-exit-if-changed .
- name: Analyze
run: dart analyze --fatal-infos .
# TODO: Run custom_lint when https://github.com/invertase/dart_custom_lint/issues/271 lands
pana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
- name: Pub cache
uses: actions/cache@v4
env:
CACHE_NAME: firebase_js_interop
with:
path: ${{ env.PUB_CACHE }}
key: pub-cache-${{ env.CACHE_NAME }}-${{ hashFiles('**/pubspec.lock') }}
restore-keys: pub-cache-${{ env.CACHE_NAME }}-
- name: Install puby
run: dart pub global activate puby
- name: Pub get
run: puby link
- name: Package scan
run: |
dart pub global activate pana
pana --exit-code-threshold 0