-
-
Notifications
You must be signed in to change notification settings - Fork 41
60 lines (49 loc) · 1.73 KB
/
test.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
# This GitHub actions runs on push to master, it:
# - Installs Dart and flutter
# - Uses Flutter beta channel for now, might make a matrix later with other channels included too.
# - Gets package dependencies
# - Runs dart analyze, allows deprecation warnings, we on purpose allow use of deprecated features for now.
# - Show outdated packages, just added for info.
# - Verify that dart format is used by all committed code, fails if not. Controversial but pub.dev penalizes you if
# dart format is not used.
# - Run all tests with coverage.
# - Upload code coverage output to Codecov for analysis.
name: Test
on:
push:
branches: [none]
paths-ignore:
- "**.md"
pull_request:
branches: [master]
paths-ignore:
- "**.md"
jobs:
run_tests:
name: Analyze and run all tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Flutter and Dart SDK
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Show Dart SDK version
run: dart --version
- name: Show Flutter SDK version
run: flutter --version
- name: Install Flutter package dependencies
run: flutter pub get
- name: Analyze Dart source
run: dart analyze
- name: Show outdated packages
run: flutter pub outdated
- name: Verify that Dart formatting is used, fail if not
run: dart format --output=none --set-exit-if-changed .
- name: Test package FlexColorPicker with test coverage
run: flutter test --coverage
- name: Upload test coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info