From ae7c6f46b6bb68080f0b4fb73bae78ee05c85d02 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:00:51 -0700 Subject: [PATCH 01/15] Update Dart CI to use checks and build shared files --- .github/workflows/{dart_ci.yml => ci.yml} | 44 +++++++++-------------- 1 file changed, 16 insertions(+), 28 deletions(-) rename .github/workflows/{dart_ci.yml => ci.yml} (67%) diff --git a/.github/workflows/dart_ci.yml b/.github/workflows/ci.yml similarity index 67% rename from .github/workflows/dart_ci.yml rename to .github/workflows/ci.yml index edc04154..44986c9a 100644 --- a/.github/workflows/dart_ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Dart CI +name: CI on: push: @@ -10,24 +10,24 @@ on: - '**' jobs: + checks: + strategy: + matrix: + sdk: [ 2.19.6, stable ] + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + sdk: ${{ matrix.sdk }} + # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. - create-sbom-release-asset: - name: Create SBOM Release Asset - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: dart-lang/setup-dart@v1 - with: - sdk: 2.19.6 # This version doesn't matter so long as it resolves. - - run: dart pub get - - name: Publish SBOM to Release Assets - uses: anchore/sbom-action@v0 - with: - path: ./ - format: cyclonedx-json - build: + uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 + with: + sdk: 2.19.6 # This version doesn't matter so long as it resolves. + + test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -60,18 +60,6 @@ jobs: 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.19.6' }} - - - name: Analyze project source - run: dart analyze - if: always() && steps.install.outcome == 'success' - - name: Run tests (DDC) run: | dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} From e9dffb8a22123946897d093d8eafb10a6802d9fd Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:01:26 -0700 Subject: [PATCH 02/15] Add publish.yaml --- .github/workflows/publish.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..15fd5880 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,15 @@ +name: Publish + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+' + +permissions: + contents: write + id-token: write + pull-requests: write + +jobs: + publish: + uses: Workiva/gha-dart-oss/.github/workflows/publish.yaml@v0.1.11 From 7dacdcce2c4b6e159eeea117f19e0b528b2ddfff Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:16:11 -0700 Subject: [PATCH 03/15] Update dart_dev analyze config --- .github/workflows/ci.yml | 1 + pubspec.yaml | 2 +- tool/dart_dev/config.dart | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 44986c9a..61599642 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: additional-checks: | no_entrypoint_imports sdk: ${{ matrix.sdk }} + format-check: ${{ matrix.sdk == '2.19.6' }} # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. diff --git a/pubspec.yaml b/pubspec.yaml index dc7f82ed..2e559b47 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ dev_dependencies: build_runner: ^2.1.2 build_test: ^2.1.3 build_web_compilers: '>=3.0.0 <5.0.0' - dart_dev: ^4.0.0 + dart_dev: ^4.2.4 dependency_validator: ^3.2.2 glob: ^2.0.0 matcher: ^0.12.11 diff --git a/tool/dart_dev/config.dart b/tool/dart_dev/config.dart index bdacb930..ebbd1bfc 100644 --- a/tool/dart_dev/config.dart +++ b/tool/dart_dev/config.dart @@ -22,4 +22,5 @@ final config = { // Don't format generated mockito files. Glob('test/mockito.mocks.dart'), ], + 'analyze': AnalyzeTool(), }; From d97e294d1e6099979f40320893b8aa2d65a39845 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:17:57 -0700 Subject: [PATCH 04/15] Update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f8a8035d..84d69b0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 7.3.1 +- Set up gha-dart-oss +- Fix no_entrypoint_imports warnings + ## 7.3.0 - Add new, opt-in React 18 JS files (see [README](https://github.com/Workiva/react-dart#html) for more info) - The preexisting JS files that use React 17 are now deprecated, and will be removed in the next major version, 8.0.0. From 210cd79f5f3bdf63357990baa41d1eec88060772 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:23:02 -0700 Subject: [PATCH 05/15] Fix Dart 3 analysis --- .github/workflows/ci.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61599642..0eb46e4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,15 +11,21 @@ on: jobs: checks: + runs-on: ubuntu-latest strategy: matrix: sdk: [ 2.19.6, stable ] - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 - with: - additional-checks: | - no_entrypoint_imports - sdk: ${{ matrix.sdk }} - format-check: ${{ matrix.sdk == '2.19.6' }} + steps: + - name: Delete Dart-2-only files when running on Dart 3 + if: ${{ matrix.sdk != '2.19.6' }} + run: | + ./tool/delete_dart_2_only_files.sh + - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + sdk: ${{ matrix.sdk }} + format-check: ${{ matrix.sdk == '2.19.6' }} # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. @@ -33,8 +39,8 @@ jobs: strategy: fail-fast: false matrix: - react: [17, 18] - sdk: [2.19.6, stable] + react: [ 17, 18 ] + sdk: [ 2.19.6, stable ] steps: - uses: actions/checkout@v2 - id: setup-dart @@ -51,6 +57,7 @@ jobs: if [[ "$DART_VERSION" =~ ^3 ]]; then ./tool/delete_dart_2_only_files.sh fi + - name: Switch to React 17 Test HTML if: ${{ matrix.react == 17 }} run: | From d1d7c27aa323462c022525b57dcfd23df472c3fc Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 15:56:55 -0700 Subject: [PATCH 06/15] Test --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0eb46e4b..70608b86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,7 @@ jobs: matrix: sdk: [ 2.19.6, stable ] steps: + - uses: actions/checkout@v2 - name: Delete Dart-2-only files when running on Dart 3 if: ${{ matrix.sdk != '2.19.6' }} run: | From 97d9d85990ffbf613b442ca5e614df51777bf845 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:10:29 -0700 Subject: [PATCH 07/15] Test --- .github/workflows/ci.yml | 20 ++++++++++++------- .../workflows/{publish.yaml => publish.yml} | 0 2 files changed, 13 insertions(+), 7 deletions(-) rename .github/workflows/{publish.yaml => publish.yml} (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70608b86..d77b4c2c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ on: - '**' jobs: - checks: + pre: runs-on: ubuntu-latest strategy: matrix: @@ -21,12 +21,18 @@ jobs: if: ${{ matrix.sdk != '2.19.6' }} run: | ./tool/delete_dart_2_only_files.sh - - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 - with: - additional-checks: | - no_entrypoint_imports - sdk: ${{ matrix.sdk }} - format-check: ${{ matrix.sdk == '2.19.6' }} + + checks: + needs: pre + strategy: + matrix: + sdk: ${{ steps.pre.strategy.matrix.sdk }} + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + sdk: ${{ matrix.sdk }} + format-check: ${{ matrix.sdk == '2.19.6' }} # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yml similarity index 100% rename from .github/workflows/publish.yaml rename to .github/workflows/publish.yml From cf906d996addc34e6d1beee48b782115913a9fca Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:13:27 -0700 Subject: [PATCH 08/15] Test --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d77b4c2c..38ec9e6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: strategy: matrix: sdk: [ 2.19.6, stable ] + outputs: + sdk: ${{ matrix.sdk }} steps: - uses: actions/checkout@v2 - name: Delete Dart-2-only files when running on Dart 3 @@ -26,7 +28,7 @@ jobs: needs: pre strategy: matrix: - sdk: ${{ steps.pre.strategy.matrix.sdk }} + sdk: ${{ steps.pre.outputs.sdk }} uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 with: additional-checks: | From df67e9802558d35385cd71ca02f638d648fa0dd7 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:14:35 -0700 Subject: [PATCH 09/15] Test --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38ec9e6a..e40182a5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: needs: pre strategy: matrix: - sdk: ${{ steps.pre.outputs.sdk }} + sdk: ${{ fromJSON(needs.pre.outputs.sdk) }} uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 with: additional-checks: | From 3fe02cfc66d98d8c80d438e64e6804d687bc600c Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:17:40 -0700 Subject: [PATCH 10/15] Test --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e40182a5..15c7a79f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,11 +45,12 @@ jobs: test: runs-on: ubuntu-latest + needs: pre strategy: fail-fast: false matrix: react: [ 17, 18 ] - sdk: [ 2.19.6, stable ] + sdk: ${{ fromJSON(needs.pre.outputs.sdk) }} steps: - uses: actions/checkout@v2 - id: setup-dart From 51c697062426cc661b2986884fc5074da6155844 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:19:06 -0700 Subject: [PATCH 11/15] Test --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15c7a79f..4dc63a64 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: needs: pre strategy: matrix: - sdk: ${{ fromJSON(needs.pre.outputs.sdk) }} + sdk: ${{ needs.pre.outputs.sdk }} uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 with: additional-checks: | @@ -50,7 +50,7 @@ jobs: fail-fast: false matrix: react: [ 17, 18 ] - sdk: ${{ fromJSON(needs.pre.outputs.sdk) }} + sdk: ${{ needs.pre.outputs.sdk }} steps: - uses: actions/checkout@v2 - id: setup-dart From a6f11ae29f56e51e9fa438b34716be237f08dd98 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:33:30 -0700 Subject: [PATCH 12/15] Make a shared workflow --- .github/workflows/actions/test.yml | 67 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 69 +----------------------------- 2 files changed, 69 insertions(+), 67 deletions(-) create mode 100644 .github/workflows/actions/test.yml diff --git a/.github/workflows/actions/test.yml b/.github/workflows/actions/test.yml new file mode 100644 index 00000000..bb435cc9 --- /dev/null +++ b/.github/workflows/actions/test.yml @@ -0,0 +1,67 @@ +name: Test Workflow + +on: + workflow_call: + inputs: + sdk: + required: true + type: string + default: 2.19.6 + +jobs: + pre: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Delete Dart-2-only files when running on Dart 3 + if: ${{ inputs.sdk != '2.19.6' }} + run: | + ./tool/delete_dart_2_only_files.sh + + checks: + needs: pre + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + sdk: ${{ inputs.sdk }} + format-check: ${{ inputs.sdk == '2.19.6' }} + + test: + runs-on: ubuntu-latest + needs: pre + strategy: + fail-fast: false + matrix: + react: [ 17, 18 ] + steps: + - uses: actions/checkout@v2 + - id: setup-dart + uses: dart-lang/setup-dart@v1 + with: + sdk: ${{ inputs.sdk }} + + - name: Print Dart SDK version + run: dart --version + + - name: Switch to React 17 Test HTML + if: ${{ matrix.react == 17 }} + run: | + mv test/templates/html_template.html test/templates/html_template-old.html + mv test/templates/html_template-react17.html test/templates/html_template.html + + - id: install + name: Install dependencies + run: dart pub get + + - name: Run tests (DDC) + run: | + dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} + if: always() && steps.install.outcome == 'success' + timeout-minutes: 8 + + - name: Run tests (dart2js) + run: | + dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js --preset=react${{ matrix.react }} + if: always() && steps.install.outcome == 'success' + timeout-minutes: 8 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4dc63a64..0bce13e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,31 +10,13 @@ on: - '**' jobs: - pre: - runs-on: ubuntu-latest - strategy: - matrix: - sdk: [ 2.19.6, stable ] - outputs: - sdk: ${{ matrix.sdk }} - steps: - - uses: actions/checkout@v2 - - name: Delete Dart-2-only files when running on Dart 3 - if: ${{ matrix.sdk != '2.19.6' }} - run: | - ./tool/delete_dart_2_only_files.sh - checks: - needs: pre strategy: matrix: - sdk: ${{ needs.pre.outputs.sdk }} - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + sdk: [ 2.19.6, stable ] + uses: ./.github/workflows/actions/test.yml with: - additional-checks: | - no_entrypoint_imports sdk: ${{ matrix.sdk }} - format-check: ${{ matrix.sdk == '2.19.6' }} # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. @@ -42,50 +24,3 @@ jobs: uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 with: sdk: 2.19.6 # This version doesn't matter so long as it resolves. - - test: - runs-on: ubuntu-latest - needs: pre - strategy: - fail-fast: false - matrix: - react: [ 17, 18 ] - sdk: ${{ needs.pre.outputs.sdk }} - steps: - - uses: actions/checkout@v2 - - id: setup-dart - uses: dart-lang/setup-dart@v1 - with: - sdk: ${{ matrix.sdk }} - - - name: Print Dart SDK version - run: dart --version - - - name: Delete Dart-2-only files when running on Dart 3 - run: | - DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}" - if [[ "$DART_VERSION" =~ ^3 ]]; then - ./tool/delete_dart_2_only_files.sh - fi - - - name: Switch to React 17 Test HTML - if: ${{ matrix.react == 17 }} - run: | - mv test/templates/html_template.html test/templates/html_template-old.html - mv test/templates/html_template-react17.html test/templates/html_template.html - - - id: install - name: Install dependencies - run: dart pub get - - - name: Run tests (DDC) - run: | - dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} - if: always() && steps.install.outcome == 'success' - timeout-minutes: 8 - - - name: Run tests (dart2js) - run: | - dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js --preset=react${{ matrix.react }} - if: always() && steps.install.outcome == 'success' - timeout-minutes: 8 From a98617ef2e9b06b463fb6088f94ed91262efd0de Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Thu, 7 Aug 2025 16:34:12 -0700 Subject: [PATCH 13/15] Make a shared workflow --- .github/workflows/ci.yml | 2 +- .github/workflows/{actions => }/test.yml | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{actions => }/test.yml (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0bce13e3..96e26239 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: sdk: [ 2.19.6, stable ] - uses: ./.github/workflows/actions/test.yml + uses: ./.github/workflows/test.yml with: sdk: ${{ matrix.sdk }} diff --git a/.github/workflows/actions/test.yml b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/actions/test.yml rename to .github/workflows/test.yml From 27d79e6f0efd0b269e8d243114a8a522537a09cf Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Fri, 8 Aug 2025 09:39:30 -0700 Subject: [PATCH 14/15] Separate dart 3 analysis --- .github/workflows/ci.yml | 81 +++++++++++++++++++++++++++++++++----- .github/workflows/test.yml | 67 ------------------------------- 2 files changed, 71 insertions(+), 77 deletions(-) delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96e26239..dbce620b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI +name: Dart CI on: push: @@ -10,17 +10,78 @@ on: - '**' jobs: - checks: - strategy: - matrix: - sdk: [ 2.19.6, stable ] - uses: ./.github/workflows/test.yml - with: - sdk: ${{ matrix.sdk }} - # Run as a separate job outside the Dart SDK matrix below, # since we can only emit a single SBOM. build: uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 with: - sdk: 2.19.6 # This version doesn't matter so long as it resolves. + sdk: 2.19.6 # This version doesn't matter so long as it resolves + + checks: + uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 + with: + additional-checks: | + no_entrypoint_imports + + stable-analyze: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v1 + with: + sdk: stable + + - name: Print Dart SDK version + run: dart --version + + - name: Delete Dart-2-only files when running on Dart 3 + run: ./tool/delete_dart_2_only_files.sh + + - name: Analyze project source + run: dart analyze + + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + react: [17, 18] + sdk: [2.19.6, stable] + steps: + - uses: actions/checkout@v2 + - id: setup-dart + uses: dart-lang/setup-dart@v1 + with: + sdk: ${{ matrix.sdk }} + + - name: Print Dart SDK version + run: dart --version + + - name: Delete Dart-2-only files when running on Dart 3 + run: | + DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}" + if [[ "$DART_VERSION" =~ ^3 ]]; then + ./tool/delete_dart_2_only_files.sh + fi + + - name: Switch to React 17 Test HTML + if: ${{ matrix.react == 17 }} + run: | + mv test/templates/html_template.html test/templates/html_template-old.html + mv test/templates/html_template-react17.html test/templates/html_template.html + + - id: install + name: Install dependencies + run: dart pub get + + - name: Run tests (DDC) + run: | + dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} + if: always() && steps.install.outcome == 'success' + timeout-minutes: 8 + + - name: Run tests (dart2js) + run: | + dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js --preset=react${{ matrix.react }} + if: always() && steps.install.outcome == 'success' + timeout-minutes: 8 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index bb435cc9..00000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,67 +0,0 @@ -name: Test Workflow - -on: - workflow_call: - inputs: - sdk: - required: true - type: string - default: 2.19.6 - -jobs: - pre: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Delete Dart-2-only files when running on Dart 3 - if: ${{ inputs.sdk != '2.19.6' }} - run: | - ./tool/delete_dart_2_only_files.sh - - checks: - needs: pre - uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 - with: - additional-checks: | - no_entrypoint_imports - sdk: ${{ inputs.sdk }} - format-check: ${{ inputs.sdk == '2.19.6' }} - - test: - runs-on: ubuntu-latest - needs: pre - strategy: - fail-fast: false - matrix: - react: [ 17, 18 ] - steps: - - uses: actions/checkout@v2 - - id: setup-dart - uses: dart-lang/setup-dart@v1 - with: - sdk: ${{ inputs.sdk }} - - - name: Print Dart SDK version - run: dart --version - - - name: Switch to React 17 Test HTML - if: ${{ matrix.react == 17 }} - run: | - mv test/templates/html_template.html test/templates/html_template-old.html - mv test/templates/html_template-react17.html test/templates/html_template.html - - - id: install - name: Install dependencies - run: dart pub get - - - name: Run tests (DDC) - run: | - dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc --preset=react${{ matrix.react }} - if: always() && steps.install.outcome == 'success' - timeout-minutes: 8 - - - name: Run tests (dart2js) - run: | - dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js --preset=react${{ matrix.react }} - if: always() && steps.install.outcome == 'success' - timeout-minutes: 8 From 2afa7b01b240cdf09999e3a3b8c82b94b7126a99 Mon Sep 17 00:00:00 2001 From: Sydney Jodon Date: Fri, 8 Aug 2025 09:45:02 -0700 Subject: [PATCH 15/15] Add comment and pub get --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbce620b..df886764 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,8 +14,6 @@ jobs: # since we can only emit a single SBOM. build: uses: Workiva/gha-dart-oss/.github/workflows/build.yaml@v0.1.11 - with: - sdk: 2.19.6 # This version doesn't matter so long as it resolves checks: uses: Workiva/gha-dart-oss/.github/workflows/checks.yaml@v0.1.11 @@ -23,16 +21,20 @@ jobs: additional-checks: | no_entrypoint_imports + # Run Dart 3 analysis as a separate job outside checks above in order to pre-run the + # Dart-2-only file removal script. Consolidate this job with checks above once checks.yaml + # supports a pre-run option or we upgrade to Dart 3 and remove the files. stable-analyze: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: dart-lang/setup-dart@v1 with: sdk: stable - name: Print Dart SDK version run: dart --version + - run: dart pub get - name: Delete Dart-2-only files when running on Dart 3 run: ./tool/delete_dart_2_only_files.sh @@ -48,7 +50,7 @@ jobs: react: [17, 18] sdk: [2.19.6, stable] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - id: setup-dart uses: dart-lang/setup-dart@v1 with: