Skip to content

Commit

Permalink
fix: Make sure the package can be built on Flutter web (#990)
Browse files Browse the repository at this point in the history
* Add test to build flutter web

* Adjust the path of the ci pipeline

* update melos config to include supabase_flutter example and use the local packages

* chore: remove packgaes from bootstrap seection

* ci: run bootstrap in non flutter packages

* ci: run supabase_flutter ci on isolate package changes

---------

Co-authored-by: Vinzent <vinzent03@proton.me>
  • Loading branch information
dshukertjr and Vinzent03 authored Jul 26, 2024
1 parent 821cad9 commit 742b761
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/functions_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gotrue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/realtime_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storage_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/supabase_flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- 'packages/realtime_client/**'
- 'packages/storage_client/**'
- 'packages/supabase/**'
- 'packages/yet_another_json_isolate/**'

pull_request:
paths:
Expand All @@ -24,6 +25,7 @@ on:
- 'packages/realtime_client/**'
- 'packages/storage_client/**'
- 'packages/supabase/**'
- 'packages/yet_another_json_isolate/**'

jobs:
test:
Expand Down Expand Up @@ -76,3 +78,8 @@ jobs:
run: |
flutter pub downgrade app_links
flutter test --concurrency=1
- name: Verify if Flutter web build is successful
run: |
cd example
flutter build web
2 changes: 1 addition & 1 deletion .github/workflows/yet_another_json_isolate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: |
cd ../../
dart pub global activate melos
melos bootstrap --ignore="supabase_flutter"
melos bootstrap --no-flutter
- name: dartfmt
if: ${{ matrix.sdk == 'stable'}}
Expand Down
1 change: 1 addition & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ repository: https://github.com/supabase/supabase-flutter

packages:
- packages/*
- packages/supabase_flutter/example

command:
version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class YAJsonIsolate {
return jsonDecode(json);
}

Future<String> encode(Map json) async {
Future<String> encode(Object? json) async {
await null;
return jsonEncode(json);
}
Expand Down

0 comments on commit 742b761

Please sign in to comment.