Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: make test work again #632

Merged
merged 3 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/functions_client_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/gotrue_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/postgrest_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/realtime_client_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/storage_client_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/supabase_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/yet_another_json_isolate_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: ['12']
sdk: [2.17.0, stable, beta, dev]

defaults:
Expand Down
6 changes: 6 additions & 0 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ scripts:

format:
exec: dart format lib test -l 80 --set-exit-if-changed

upgrade:
exec: dart pub upgrade

outdated:
exec: dart pub outdated

update-version:
run: |
Expand Down
12 changes: 4 additions & 8 deletions packages/supabase/test/mock_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,6 @@ void main() {
});

tearDown(() async {
listeners.clear();

await client.dispose();
await customHeadersClient.dispose();

Expand All @@ -365,6 +363,8 @@ void main() {
// Wait for the realtime updates to come through
await Future.delayed(Duration(milliseconds: 100));

listeners.clear();

await webSocket?.close();

await listener?.cancel();
Expand Down Expand Up @@ -512,16 +512,12 @@ void main() {
final stream = client
.from('todos')
.stream(primaryKey: ['id']).asyncMap((event) => event);
stream.listen(expectAsync1((event) {
print(event);
}, count: 5));
stream.listen(expectAsync1((event) {}, count: 5));

await Future.delayed(Duration(seconds: 3));

// All realtime events are done emitting, so should receive the currnet data
stream.listen(expectAsync1((event) {
print('called');
}, count: 1));
stream.listen(expectAsync1((event) {}, count: 1));
});

test('emits data with custom headers', () {
Expand Down