-
-
Notifications
You must be signed in to change notification settings - Fork 9
83 lines (65 loc) · 2.8 KB
/
dart.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Dart CI
on:
push:
branches: [ master ]
paths-ignore: [ '**.md' ]
pull_request:
branches: [ master ]
paths-ignore: [ '**.md' ]
schedule:
# Runs at 02:00 UTC on the 1, 4, 7, 10, 13, 16, 19, 22, 25, 28 and 31st of every month.
- cron: "0 2 */3 * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
# sdk: [ beta, stable, 2.17.0, 2.15.0, 2.12.0 ]
# rxdart: [ 0.27.5, 0.27.6, 0.27.7, not_override ]
sdk: [ beta, stable, 3.0.0 ]
rxdart: [ not_override ]
steps:
- uses: actions/checkout@v4
- name: Setup Dart
uses: dart-lang/setup-dart@v1.4
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart version
run: dart --version
- name: Override rxdart version to ${{ matrix.rxdart }}
if: ${{ matrix.rxdart != 'not_override' }}
run: sh tool/override_rxdart_version.sh
env:
RXDART_VERSION: ${{ matrix.rxdart }}
- name: Changes frontend_server_client to ^4.0.0
if: ${{ matrix.sdk == 'stable' || matrix.sdk == 'beta' }}
run: sh tool/override_frontend_server_client_version.sh
- name: Install dependencies
run: dart pub get
- name: Analyze
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: dart analyze lib --fatal-infos --fatal-warnings
- name: Format code
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: dart format . --set-exit-if-changed
- name: Active coverage
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: dart pub global activate coverage
- name: Run tests
run: dart pub run test test/rxdart_ext_test.dart --chain-stack-traces
- name: Start Observatory
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: dart --disable-service-auth-codes --enable-vm-service=8111 --pause-isolates-on-exit --enable-asserts test/rxdart_ext_test.dart &
- name: Collect coverage
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: nohup dart pub global run coverage:collect_coverage --port=8111 --out=coverage.json --wait-paused --resume-isolates
- name: Format coverage
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
run: dart pub global run coverage:format_coverage --lcov --in=coverage.json --out=lcov.info --report-on=lib
- uses: codecov/codecov-action@v5.0.2
if: ${{ matrix.sdk == 'stable' && matrix.rxdart == 'not_override' }}
with:
fail_ci_if_error: true # optional (default = false)
token: ${{ secrets.CODECOV_TOKEN }} # required
verbose: true # optional (default = false)