forked from BilalShahid13/PersistentBottomNavBar
-
Notifications
You must be signed in to change notification settings - Fork 59
97 lines (79 loc) · 2.3 KB
/
tests.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
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
94
95
96
97
name: Tests
on:
push:
branches:
- master
pull_request:
workflow_call:
env:
FLUTTER_VERSION: "3.19.3"
jobs:
tests:
name: Unit tests on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
shell: bash
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v2
- name: Get packages
run: flutter pub get
# Analyze, check formatting, and run unit tests.
- name: Run Unit Tests
run: flutter test --coverage
- name: Upload Coverage to Codecov
if: ${{ runner.os == 'Linux' }}
uses: codecov/codecov-action@v2
format:
name: Format
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v2
- run: dart pub get
- name: Format
run: dart format --set-exit-if-changed .
analyze:
name: Analyze
runs-on: ubuntu-latest
steps:
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: 'stable'
cache: true
cache-key: 'flutter-:os:-:channel:-:version:'
cache-path: '${{ runner.tool_cache }}/flutter/:channel:-:version:'
- name: Flutter doctor
run: flutter doctor -v
# Checkout and get packages.
- name: Checkout
uses: actions/checkout@v2
- run: dart pub get
- name: Analyze
run: dart analyze