Skip to content

Commit

Permalink
Merge branch 'main' into feat/custom-metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinzent03 committed Feb 4, 2025
2 parents 0fc190a + 6976fae commit 70b6861
Show file tree
Hide file tree
Showing 98 changed files with 1,881 additions and 412 deletions.
96 changes: 96 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Combined Coverage Report

on:
push:
branches:
- main
pull_request:

jobs:
coverage:
name: Generate Combined Coverage
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: subosito/flutter-action@v2
with:
flutter-version: '3.x'
channel: 'stable'

- name: Install dependencies
run: |
dart pub global activate melos
dart pub global activate coverage
dart pub global activate combine_coverage
melos bootstrap
- name: Run tests with coverage for all packages
run: |
# Create directory for combined coverage
mkdir coverage
# Run tests for each package and generate coverage
cd packages
for d in */ ; do
cd "$d"
if [ -f "pubspec.yaml" ]; then
echo "Running tests for $d"
if [[ "$d" == "supabase_flutter/"* ]]; then
flutter test --coverage --concurrency=1
else
# Set up Docker containers based on package
if [[ "$d" == "postgrest/"* ]]; then
cd ../../infra/postgrest
docker compose down
docker compose up -d
cd ../../packages/postgrest
dart test --coverage=coverage --concurrency=1
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o coverage/lcov.info -i coverage
cd ../../infra/postgrest
docker compose down
sleep 5s
cd ../../packages/postgrest
elif [[ "$d" == "gotrue/"* ]]; then
cd ../../infra/gotrue
docker compose down
docker compose up -d
cd ../../packages/gotrue
dart test --coverage=coverage --concurrency=1
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o coverage/lcov.info -i coverage
cd ../../infra/gotrue
docker compose down
sleep 5s
cd ../../packages/gotrue
elif [[ "$d" == "storage_client/"* ]]; then
cd ../../infra/storage_client
docker compose down
docker compose up -d
cd ../../packages/storage_client
dart test --coverage=coverage --concurrency=1
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o coverage/lcov.info -i coverage
cd ../../infra/storage_client
docker compose down
sleep 5s
cd ../../packages/storage_client
else
cd ../../packages/$d
dart test --coverage=coverage --concurrency=1
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o coverage/lcov.info -i coverage
fi
fi
fi
cd ..
done
cd ..
- name: Combine coverage reports
run: |
dart pub global run combine_coverage:combine_coverage --repo-path="./" --output-directory="coverage"
- name: Upload combined coverage report
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./coverage/lcov.info
5 changes: 5 additions & 0 deletions .github/workflows/functions_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Run tests
run: dart test
5 changes: 5 additions & 0 deletions .github/workflows/gotrue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Build Docker image
run: |
cd ../../infra/gotrue
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/postgrest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,13 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Build Docker image
run: |
cd ../../infra/postgrest
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/realtime_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Run tests
run: dart test
run: dart test --concurrency=1
5 changes: 5 additions & 0 deletions .github/workflows/storage_client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Build Docker image
run: |
cd ../../infra/storage_client
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/supabase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Run tests
run: dart test --concurrency=1
2 changes: 1 addition & 1 deletion .github/workflows/supabase_flutter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ jobs:
- name: Verify if Flutter web build is successful
run: |
cd example
flutter build web
flutter build web
5 changes: 5 additions & 0 deletions .github/workflows/yet_another_json_isolate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ jobs:
run: dart format lib test -l 80 --set-exit-if-changed

- name: analyzer
if: ${{ matrix.sdk == 'stable'}}
run: dart analyze --fatal-warnings --fatal-infos .

- name: analyzer
if: ${{ matrix.sdk == 'beta' || matrix.sdk == 'dev' }}
run: dart analyze

- name: Run tests
run: dart test
Loading

0 comments on commit 70b6861

Please sign in to comment.