-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (71 loc) · 1.76 KB
/
checks.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: checks
on:
push:
branches:
- main
pull_request_target:
branches:
- main
paths:
- '.github/workflows/checks.yml'
- '**/lib/**'
- '**/android/**'
- '**/ios/**'
- '**/web/**'
- '**/macos/**'
- '**/windows/**'
- '**/pubspec.yaml'
- '**/test/**'
- '**/test_driver/**'
- '**/assets/**'
- '**/integration_test/**'
jobs:
analyze:
timeout-minutes: 11
runs-on: ubuntu-latest
name: analysis on ${{ matrix.channel }}
strategy:
matrix:
channel:
- 'stable'
- 'beta'
- 'master'
fail-fast: false
steps:
- uses: actions/[email protected]
- uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.channel }}
- name: pub get
run: flutter pub get
- name: dart format
run: dart format . --fix --set-exit-if-changed
- run: flutter analyze
test:
timeout-minutes: 16
runs-on: macos-latest
name: testing on ${{ matrix.channel }}
strategy:
matrix:
channel:
- 'stable'
- 'beta'
- 'master'
fail-fast: false
steps:
- uses: actions/[email protected]
- uses: subosito/flutter-action@v2
with:
channel: ${{ matrix.channel }}
- run: flutter pub get
- name: Run unit tests
if: ${{ matrix.channel == 'master' || matrix.channel == 'beta' }}
run: flutter test
- name: Run unit tests with coverage
if: ${{ matrix.channel == 'stable' }}
run: flutter test --coverage
- name: Upload coverage to Codecov
if: ${{ matrix.channel == 'stable' }}
uses: codecov/codecov-action@v3
with:
files: coverage/lcov.info