From 2ffeef00f95657c822b5ec4fd912759fe19127f9 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Tue, 13 Aug 2024 18:42:23 +0200 Subject: [PATCH 1/4] test: flutter wasm --- .github/workflows/flutter.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index cf2b71069c..fe1410f704 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -77,21 +77,27 @@ jobs: - run: flutter upgrade - name: Pub Get - run: | - cd flutter - flutter pub get + working-directory: flutter + run: flutter pub get - - name: Test chrome + - name: Test web (JS) if: matrix.target == 'web' + working-directory: flutter` run: | - cd flutter flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit + - name: Test web (WASM) + if: matrix.target == 'web' + working-directory: flutter + run: | + flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --exclude-tags canvasKit + flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit + - name: Test VM with coverage if: matrix.target == 'linux' || matrix.target == 'macos' || matrix.target == 'windows' + working-directory: flutter run: | - cd flutter flutter test --coverage --test-randomize-ordering-seed=random dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart' From 3a4af211aaf82c607745d860d4f141b7460b4c59 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Tue, 13 Aug 2024 18:58:20 +0200 Subject: [PATCH 2/4] temporarily disable failing tests --- .../test/integrations/flutter_error_integration_test.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flutter/test/integrations/flutter_error_integration_test.dart b/flutter/test/integrations/flutter_error_integration_test.dart index 73d92565c2..40a8ef7c36 100644 --- a/flutter/test/integrations/flutter_error_integration_test.dart +++ b/flutter/test/integrations/flutter_error_integration_test.dart @@ -82,6 +82,10 @@ void main() { expect(event.contexts['flutter_error_details']['context'], 'thrown while handling a gesture'); expect(event.contexts['flutter_error_details']['information'], 'foo bar'); + }, onPlatform: { + // TODO stacktrace parsing for wasm is not implemented yet + // https://github.com/getsentry/sentry-dart/issues/1480 + 'wasm': Skip('WASM stack trace parsing not implemented yet'), }); test('captures error with long FlutterErrorDetails.information', () async { @@ -115,6 +119,10 @@ void main() { 'thrown while handling a gesture'); expect(event.contexts['flutter_error_details']['information'], 'foo bar\nHello World!'); + }, onPlatform: { + // TODO stacktrace parsing for wasm is not implemented yet + // https://github.com/getsentry/sentry-dart/issues/1480 + 'wasm': Skip('WASM stack trace parsing not implemented yet'), }); test('captures error with no FlutterErrorDetails', () async { From aa4fd4d7b6fc91758c017412e408357981ac5428 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Tue, 13 Aug 2024 19:04:59 +0200 Subject: [PATCH 3/4] fixup ci --- .github/workflows/flutter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index fe1410f704..609d55b130 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -82,7 +82,7 @@ jobs: - name: Test web (JS) if: matrix.target == 'web' - working-directory: flutter` + working-directory: flutter run: | flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit From 59c0bf23d39a22b846a358fc8b42f639d824d098 Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Tue, 13 Aug 2024 19:06:12 +0200 Subject: [PATCH 4/4] cleanup --- .github/workflows/flutter.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 609d55b130..236a8546eb 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -29,6 +29,7 @@ jobs: defaults: run: shell: bash + working-directory: flutter strategy: fail-fast: false matrix: @@ -77,26 +78,22 @@ jobs: - run: flutter upgrade - name: Pub Get - working-directory: flutter run: flutter pub get - name: Test web (JS) if: matrix.target == 'web' - working-directory: flutter run: | flutter test --platform chrome --test-randomize-ordering-seed=random --exclude-tags canvasKit flutter test --platform chrome --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit - name: Test web (WASM) if: matrix.target == 'web' - working-directory: flutter run: | flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --exclude-tags canvasKit flutter test --platform chrome --wasm --test-randomize-ordering-seed=random --tags canvasKit --web-renderer canvaskit - name: Test VM with coverage if: matrix.target == 'linux' || matrix.target == 'macos' || matrix.target == 'windows' - working-directory: flutter run: | flutter test --coverage --test-randomize-ordering-seed=random dart run remove_from_coverage -f coverage/lcov.info -r 'binding.dart' @@ -117,11 +114,11 @@ jobs: exclude: 'lib/src/native/cocoa/binding.dart' - name: Build ${{ matrix.target }} + working-directory: flutter/example run: | flutter config --enable-windows-desktop flutter config --enable-macos-desktop flutter config --enable-linux-desktop - cd flutter/example TARGET=${{ matrix.target }} flutter pub get case $TARGET in