-
-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (59 loc) · 1.76 KB
/
dart.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
name: Dart CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Dart version
run: |
dart --version
uname -a
- name: Install dependencies
run: dart pub get
- name: Upgrade dependencies
run: dart pub upgrade
- name: dart format
run: dart format -o none --set-exit-if-changed .
- name: dart analyze
run: dart analyze --fatal-infos --fatal-warnings .
- name: dependency_validator
run: dart run dependency_validator
- name: dart doc
run: dart doc --dry-run
- name: dart pub publish --dry-run
run: dart pub publish --dry-run
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Dart version
run: |
dart --version
uname -a
- name: Install dependencies
run: dart pub get
- name: Upgrade dependencies
run: dart pub upgrade
- name: Run tests (VM)
run: dart test --platform vm --coverage=./coverage
- name: Generate coverage report
run: |
dart pub global activate coverage
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
directory: ./coverage/
flags: unittests
env_vars: OS,DART
fail_ci_if_error: true
verbose: true