Skip to content

Commit 27d79e6

Browse files
Separate dart 3 analysis
1 parent a98617e commit 27d79e6

File tree

2 files changed

+71
-77
lines changed

2 files changed

+71
-77
lines changed

.github/workflows/ci.yml

Lines changed: 71 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Dart CI
22

33
on:
44
push:
@@ -10,17 +10,78 @@ on:
1010
- '**'
1111

1212
jobs:
13-
checks:
14-
strategy:
15-
matrix:
16-
sdk: [ 2.19.6, stable ]
17-
uses: ./.github/workflows/test.yml
18-
with:
19-
sdk: ${{ matrix.sdk }}
20-
2113
# Run as a separate job outside the Dart SDK matrix below,
2214
# since we can only emit a single SBOM.
2315
build:
2416
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
2517
with:
26-
sdk: 2.19.6 # This version doesn't matter so long as it resolves.
18+
sdk: 2.19.6 # This version doesn't matter so long as it resolves
19+
20+
checks:
21+
uses: Workiva/gha-dart-oss/.github/workflows/[email protected]
22+
with:
23+
additional-checks: |
24+
no_entrypoint_imports
25+
26+
stable-analyze:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: dart-lang/setup-dart@v1
31+
with:
32+
sdk: stable
33+
34+
- name: Print Dart SDK version
35+
run: dart --version
36+
37+
- name: Delete Dart-2-only files when running on Dart 3
38+
run: ./tool/delete_dart_2_only_files.sh
39+
40+
- name: Analyze project source
41+
run: dart analyze
42+
43+
test:
44+
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: false
47+
matrix:
48+
react: [17, 18]
49+
sdk: [2.19.6, stable]
50+
steps:
51+
- uses: actions/checkout@v2
52+
- id: setup-dart
53+
uses: dart-lang/setup-dart@v1
54+
with:
55+
sdk: ${{ matrix.sdk }}
56+
57+
- name: Print Dart SDK version
58+
run: dart --version
59+
60+
- name: Delete Dart-2-only files when running on Dart 3
61+
run: |
62+
DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}"
63+
if [[ "$DART_VERSION" =~ ^3 ]]; then
64+
./tool/delete_dart_2_only_files.sh
65+
fi
66+
67+
- name: Switch to React 17 Test HTML
68+
if: ${{ matrix.react == 17 }}
69+
run: |
70+
mv test/templates/html_template.html test/templates/html_template-old.html
71+
mv test/templates/html_template-react17.html test/templates/html_template.html
72+
73+
- id: install
74+
name: Install dependencies
75+
run: dart pub get
76+
77+
- name: Run tests (DDC)
78+
run: |
79+
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }}
80+
if: always() && steps.install.outcome == 'success'
81+
timeout-minutes: 8
82+
83+
- name: Run tests (dart2js)
84+
run: |
85+
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js --preset=react${{ matrix.react }}
86+
if: always() && steps.install.outcome == 'success'
87+
timeout-minutes: 8

.github/workflows/test.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)