-
Notifications
You must be signed in to change notification settings - Fork 72
100 lines (81 loc) · 2.87 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
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
98
99
100
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Dart
on:
push:
branches:
- master
- gha
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: dio_cache_interceptor
steps:
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: Install dependencies
run: dart pub get
# verify the use of 'dart format' on each commit.
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: Analyze project source
run: dart analyze
- name: Activate coverage
run: |
dart pub global activate coverage
- name: Run tests with coverage
run: |
dart pub global run coverage:test_with_coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{secrets.CODECOV_TOKEN}}
files: dio_cache_interceptor/coverage/lcov.info
# Run store tests.
- name: Run tests with coverage on DB Store
working-directory: dio_cache_interceptor_db_store
run: |
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on File Store
working-directory: dio_cache_interceptor_file_store
run: |
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on Hive Store
working-directory: dio_cache_interceptor_hive_store
run: |
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on Hive CE Store
working-directory: dio_cache_interceptor_hive_ce_store
run: |
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on ObjectBox Store
working-directory: dio_cache_interceptor_objectbox_store
run: |
bash <(curl -s https://raw.githubusercontent.com/objectbox/objectbox-dart/main/install.sh)
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on Sembast Store
working-directory: dio_cache_interceptor_sembast_storage
run: |
dart pub get
dart pub global run coverage:test_with_coverage
- name: Run tests with coverage on Isar Store
working-directory: dio_cache_interceptor_isar_store
run: |
dart pub get
dart pub global run coverage:test_with_coverage