-
Notifications
You must be signed in to change notification settings - Fork 128
44 lines (37 loc) · 1.15 KB
/
ci.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
name: Continuous Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_call:
jobs:
run-tests:
name: Run tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Install dart dependencies
run: dart pub get
- name: Analyze package
run: dart analyze lib test example
- name: Verify package formatting
run: dart format --set-exit-if-changed lib test example
- name: Run tests and generate coverage reports
run: |
dart test --reporter=github --coverage=./coverage/reports
dart pub global activate coverage
dart pub global run coverage:format_coverage --report-on=./lib --lcov --in=./coverage/reports --out=coverage/lcov.info
- if: matrix.os == 'ubuntu-latest'
name: Report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info
fail_ci_if_error: true