generated from yumemi-inc/flutter-training-template
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.8 KB
/
check-pr.yaml
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
name: check-pr
on:
pull_request:
jobs:
check:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
# https://github.com/actions/checkout
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
# https://github.com/kuhnroyal/flutter-fvm-config-action
- name: Fetch flutter config
uses: kuhnroyal/flutter-fvm-config-action@v1
# https://github.com/subosito/flutter-action
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: ${{ env.FLUTTER_CHANNEL }}
cache: true
cache-key: ${{ env.FLUTTER_VERSION }}-${{ env.FLUTTER_CHANNEL }}
# https://github.com/actions/cache
- name: Cache dependencies
uses: actions/cache@v3
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: flutter pub get
# https://github.com/blendthink/elixir
- name: Report analyze
uses: blendthink/elixir@v2
- name: Run test
run: flutter test --no-pub --machine > test_report.log
continue-on-error: true
# https://github.com/dorny/test-reporter
- name: Report test
uses: dorny/test-reporter@v1
with:
name: 'flutter test'
path: 'test_report.log'
reporter: 'flutter-json'
fail-on-error: 'true'