Skip to content

chore: Generate coverage reports and upload them. #435

chore: Generate coverage reports and upload them.

chore: Generate coverage reports and upload them. #435

name: supabase_flutter
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test Flutter v${{ matrix.flutter-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
flutter-version: ['3.10.x', '3.x']
defaults:
run:
working-directory: packages/supabase_flutter
runs-on: ${{ matrix.os }}
steps:
- name: Checks-out repo
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
- run: flutter --version
- name: Bootstrap workspace
run: |
cd ../../
dart pub global activate melos
melos bootstrap
- name: flutterfmt
if: ${{ matrix.sdk == '3.x'}}
run: dart format lib test -l 80 --set-exit-if-changed
- name: analyzer
if: ${{ matrix.sdk == '3.x'}}
run: flutter analyze --fatal-warnings --fatal-infos .
- name: Run tests
run: flutter test --concurrency=1 --coverage
- name: Run tests with downgraded app_links
run: |
flutter pub downgrade app_links
flutter test --concurrency=1
- name: Verify if Flutter web build is successful
run: |
cd example
flutter build web
- name: Upload coverage artifact
if: ${{ matrix.sdk == 'stable'}}
uses: actions/upload-artifact@v4
with:
name: coverage-flutter-supabase-flutter
path: ./packages/supabase_flutter/coverage/lcov.info