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