Skip to content

Commit 3bc6134

Browse files
committed
chore: Update CI to generate coverage report.
1 parent 46b483f commit 3bc6134

File tree

9 files changed

+48
-8
lines changed

9 files changed

+48
-8
lines changed

.github/workflows/functions_client.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,7 @@ jobs:
5454
run: dart analyze --fatal-warnings --fatal-infos .
5555

5656
- name: Run tests
57-
run: dart test
57+
run: dart test --coverage=./coverage
58+
59+
- name: Update coverage
60+
run: melos run update-coverage

.github/workflows/gotrue.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,7 @@ jobs:
6262
time: '5s'
6363

6464
- name: Run tests
65-
run: dart test --concurrency=1
65+
run: dart test --concurrency=1 --coverage=./coverage
66+
67+
- name: Update coverage
68+
run: melos run update-coverage

.github/workflows/postgrest.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,7 @@ jobs:
6464
time: '5s'
6565

6666
- name: Run tests
67-
run: dart test --concurrency=1
67+
run: dart test --concurrency=1 --coverage=./coverage
68+
69+
- name: Update coverage
70+
run: melos run update-coverage

.github/workflows/realtime_client.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ jobs:
5151
run: dart analyze --fatal-warnings --fatal-infos .
5252

5353
- name: Run tests
54-
run: dart test
54+
run: dart test --coverage=./coverage
55+
56+
- name: Update coverage
57+
run: melos run update-coverage

.github/workflows/storage_client.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,7 @@ jobs:
6161
time: '5s'
6262

6363
- name: Run tests
64-
run: dart test
64+
run: dart test --coverage=./coverage
65+
66+
- name: Update coverage
67+
run: melos run update-coverage

.github/workflows/supabase.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,10 @@ jobs:
6161
run: dart analyze --fatal-warnings --fatal-infos .
6262

6363
- name: Run tests
64-
run: dart test --concurrency=1
64+
run: dart test --concurrency=1 --coverage=./coverage
65+
66+
- name: Update coverage
67+
run: |
68+
dart pub global activate combine_coverage
69+
melos run update-coverage
70+
dart pub global run combine_coverage --repo-path="../../"

.github/workflows/supabase_flutter.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
run: flutter analyze --fatal-warnings --fatal-infos .
6969

7070
- name: Run tests
71-
run: flutter test --concurrency=1
71+
run: flutter test --concurrency=1 --coverage
7272

7373
- name: Run tests with downgraded app_links
7474
run: |
@@ -79,3 +79,6 @@ jobs:
7979
run: |
8080
cd example
8181
flutter build web
82+
83+
- name: Update coverage
84+
run: melos run update-coverage

.github/workflows/yet_another_json_isolate.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ jobs:
5151
run: dart analyze --fatal-warnings --fatal-infos .
5252

5353
- name: Run tests
54-
run: dart test
54+
run: dart test --coverage=./coverage
55+
56+
- name: Update coverage
57+
run: melos run update-coverage

melos.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,16 @@ scripts:
5454
# Stage the version.dart file change
5555
git add packages/*/lib/src/version.dart
5656
description: Updates the version.dart file for each packages except yet_another_json_isolate
57+
58+
update-coverage:
59+
description: Updates the coverage for the workspace
60+
run: |
61+
# Activate coverage and combine_coverage
62+
dart pub global activate coverage
63+
dart pub global activate combine_coverage
64+
65+
# Format coverage
66+
dart pub global run coverage:format_coverage --lcov --in="./coverage/test" --out="./coverage/lcov.info" --report-on="./lib"
67+
68+
# Combine coverage
69+
dart pub global run combine_coverage --repo-path="../../"

0 commit comments

Comments
 (0)