69 lines (57 loc) · 1.67 KB
/
rad_html_vscode_pkg.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
name: Rad(html-vscode-pkg)
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
analyze:
runs-on: ubuntu-latest
name: Analyze
strategy:
matrix:
dart-sdk-version: [3.2.0]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart-sdk-version }}
- name: Run analyze
run: |
cd packages/rad_html_vscode
dart pub get
dart format --output=none --set-exit-if-changed .
dart analyze --fatal-infos
tests:
runs-on: ubuntu-latest
name: Run tests
strategy:
matrix:
dart-sdk-version: [2.17.0, 3.0.0]
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.dart-sdk-version }}
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Generate tests
run: |
cd packages/rad_html_vscode
python3 test/gen.py
- name: Run tests
run: |
cd packages/rad_html_vscode
dart pub get
dart pub run test --coverage="coverage"
dart pub global activate coverage
$HOME/.pub-cache/bin/format_coverage --lcov --in=coverage --out=rad_html_vscode.lcov --report-on=lib
mv rad_html_vscode.lcov ../../rad_html_vscode.dart.${{ matrix.dart-sdk-version }}.lcov
- name: Publish to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: rad_html_vscode.dart.${{ matrix.dart-sdk-version }}.lcov
verbose: true