-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (47 loc) · 1.29 KB
/
main.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
name: main
on:
pull_request:
types: [review_requested, opened, synchronize]
paths-ignore:
- '.gitignore'
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
push:
branches:
- '*'
paths-ignore:
- '.gitignore'
- 'CHANGELOG.md'
- 'LICENSE'
- 'README.md'
jobs:
build-and-test:
runs-on: macos-latest
strategy:
matrix:
sdk: [2.17.0, 3.0.0, stable, beta, dev]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Get packages
run: dart pub get
- name: Analyze
run: dart analyze
- name: Run unit tests
run: dart test --coverage=coverage
- name: Install coverage tools
if: ${{ matrix.sdk }} == 'stable'
run: dart pub global activate coverage
- name: Format coverage file
if: ${{ matrix.sdk }} == 'stable'
run: $HOME/.pub-cache/bin/format_coverage --lcov --in=coverage --out=coverage.lcov --report-on=lib
- name: Upload coverage reports to Codecov
if: ${{ matrix.sdk }} == 'stable'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.lcov