-
-
Notifications
You must be signed in to change notification settings - Fork 8
38 lines (38 loc) · 1.05 KB
/
test.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
name: Test
on:
pull_request:
branches:
- main
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Dart SDK
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: |
cd xml_serializable
dart pub get
- name: Run tests
run: |
cd xml_serializable
dart test --coverage './coverage'
- name: Format coverage
run: |
cd xml_serializable
dart pub global activate coverage
dart pub global run coverage:format_coverage --report-on 'lib' --lcov --out './coverage/lcov.info' --in './coverage'
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.os }}-${{ matrix.sdk }}
path: ./xml_serializable/coverage/lcov.info
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
sdk: [stable, beta, dev]