Skip to content

Commit b91c868

Browse files
committed
Added new workflow job that runs just the web plugin tests.
1 parent b3f0784 commit b91c868

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/checks.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,35 @@ jobs:
455455
flutter pub get
456456
flutter build web --debug --target=./lib/main.dart
457457
458+
web_plugin_unit_test:
459+
needs: setup_matrix
460+
runs-on: ubuntu-latest
461+
timeout-minutes: 15
462+
strategy:
463+
matrix:
464+
flutter_version: ${{ fromJson(needs.setup_matrix.outputs.flutter_versions_json) }}
465+
name: Web Plugin Unit Test (${{ matrix.flutter_version }})
466+
steps:
467+
- uses: actions/checkout@v6
468+
- uses: subosito/flutter-action@v2
469+
with:
470+
flutter-version: ${{ (contains(matrix.flutter_version, '.') || contains(matrix.flutter_version, 'x')) && matrix.flutter_version || '' }}
471+
channel: ${{ (!contains(matrix.flutter_version, '.') && !contains(matrix.flutter_version, 'x')) && matrix.flutter_version || '' }}
472+
cache: true
473+
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}
474+
475+
- name: Install dependencies
476+
run: flutter pub get
477+
working-directory: wakelock_plus
478+
479+
- name: Run Web Plugin Tests
480+
run: |
481+
flutter test \
482+
--platform chrome \
483+
--dart-define=WEB_PLUGIN_TESTS=true \
484+
test/wakelock_plus_web_plugin_test.dart
485+
working-directory: wakelock_plus
486+
458487
web_integration_test:
459488
needs: setup_matrix
460489
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)