-
Notifications
You must be signed in to change notification settings - Fork 67
63 lines (54 loc) · 1.75 KB
/
dart_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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Dart CI
on:
push:
branches:
- 'master'
- 'test_consume_*'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Can't run on `stable` (Dart 3) until we're fully null-safe.
sdk: [2.18.7]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart SDK version
run: dart --version
- id: install
name: Install dependencies
run: dart pub get
- name: Validate dependencies
run: dart run dependency_validator
if: always() && steps.install.outcome == 'success'
- name: Verify formatting
run: dart run dart_dev format --check
if: ${{ matrix.sdk == '2.18.7' }}
- name: Analyze project source
run: dart analyze
if: always() && steps.install.outcome == 'success'
- name: Run tests (DDC)
run: |
if [ ${{ matrix.sdk }} = '2.13.4' ]; then
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc-legacy
else
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc
fi
if: always() && steps.install.outcome == 'success'
timeout-minutes: 5
- name: Run tests (dart2js)
run: |
if [ ${{ matrix.sdk }} = '2.13.4' ]; then
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js-legacy
else
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js
fi
if: always() && steps.install.outcome == 'success'
timeout-minutes: 5