-
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (36 loc) · 1.21 KB
/
Copy pathtest.yaml
File metadata and controls
47 lines (36 loc) · 1.21 KB
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
name: Test and Coverage
on:
push:
branches: [ main, master, exports-and-tests ]
pull_request:
branches: [ main, master, exports-and-tests ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
dart-version: [stable, beta]
steps:
- uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart-version }}
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: |
dart pub downgrade
dart analyze --fatal-infos
- name: Run tests with coverage
run: dart test --coverage=coverage --fail-fast
- name: Generate LCOV report
run: dart pub global activate coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info
fail_ci_if_error: false