-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (40 loc) · 1.43 KB
/
check_pr.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
name: check-pr
on:
pull_request:
jobs:
check_pr:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# setup OIDC token
- uses: dart-lang/setup-dart@v1
# https://github.com/dart-lang/setup-dart/blob/v1/.github/workflows/publish.yml
- name: Fetch flutter config
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: true
# https://github.com/actions/cache
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
${{ env.PUB_CACHE }}
${{ github.workspace }}/.packages
${{ github.workspace }}/.flutter-plugins
${{ github.workspace }}/.flutter-plugin-dependencies
${{ github.workspace }}/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles(format('{0}{1}', github.workspace, '/pubspec.lock')) }}
restore-keys: |
build-pubspec-
- name: Install dependencies
run: dart pub get
# https://github.com/invertase/github-action-dart-analyzer
- name: Report analyze
uses: invertase/github-action-dart-analyzer@v3
with:
fatal-infos: true