Fix test compatibility with Dart 3 (dart-lang/stream_transform#159)
Move opt out test to separate directory so they will not run by default.
Collapse the chrome and VM tests into a single workflow step.
Add a separate workflow step to run the chrome and VM opt out tests for
only the oldest supported SDK.
diff --git a/pkgs/stream_transform/.github/workflows/test-package.yml b/pkgs/stream_transform/.github/workflows/test-package.yml
index 3aa30d4..ac6cb69 100644
--- a/pkgs/stream_transform/.github/workflows/test-package.yml
+++ b/pkgs/stream_transform/.github/workflows/test-package.yml
@@ -47,6 +47,7 @@
matrix:
# Add macos-latest and/or windows-latest if relevant for this package.
os: [ubuntu-latest]
+ # Bump SDK for Legacy tets when changning min SDK.
sdk: [2.14.0, dev]
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
@@ -56,9 +57,9 @@
- id: install
name: Install dependencies
run: dart pub get
- - name: Run VM tests
- run: dart test --platform vm --test-randomize-ordering-seed=random
+ - name: Run tests
+ run: dart test -p chrome,vm --test-randomize-ordering-seed=random
if: always() && steps.install.outcome == 'success'
- - name: Run Chrome tests
- run: dart test --platform chrome --test-randomize-ordering-seed=random
- if: always() && steps.install.outcome == 'success'
+ - name: Run Legacy tests
+ run: dart test -p chrome,vm --test-randomize-ordering-seed=random legacy_test
+ if: always() && matrix.sdk == '2.14.0' && steps.install.outcome == 'success'
diff --git a/pkgs/stream_transform/test/opt_out_test.dart b/pkgs/stream_transform/legacy_test/opt_out_test.dart
similarity index 100%
rename from pkgs/stream_transform/test/opt_out_test.dart
rename to pkgs/stream_transform/legacy_test/opt_out_test.dart