feat: Add standard client headers (#1130) #524
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: supabase_flutter | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/supabase_flutter/**' | |
- '.github/workflows/supabase_flutter.yml' | |
- 'packages/functions_client/**' | |
- 'packages/gotrue/**' | |
- 'packages/postgrest/**' | |
- 'packages/realtime_client/**' | |
- 'packages/storage_client/**' | |
- 'packages/supabase/**' | |
- 'packages/yet_another_json_isolate/**' | |
pull_request: | |
paths: | |
- 'packages/supabase_flutter/**' | |
- '.github/workflows/supabase_flutter.yml' | |
- 'packages/functions_client/**' | |
- 'packages/gotrue/**' | |
- 'packages/postgrest/**' | |
- 'packages/realtime_client/**' | |
- 'packages/storage_client/**' | |
- 'packages/supabase/**' | |
- 'packages/yet_another_json_isolate/**' | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Test Flutter v${{ matrix.flutter-version }} on ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
flutter-version: ['3.19.x', '3.x'] | |
defaults: | |
run: | |
working-directory: packages/supabase_flutter | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
channel: 'stable' | |
- name: Show Flutter version | |
run: flutter --version | |
- name: Bootstrap workspace | |
run: | | |
cd ../../ | |
dart pub global activate melos | |
melos bootstrap | |
- name: Run formatter | |
if: ${{ matrix.flutter-version == '3.x'}} | |
run: dart format lib test -l 80 --set-exit-if-changed | |
- name: Run analyzer | |
if: ${{ matrix.flutter-version == '3.x'}} | |
run: flutter analyze --fatal-warnings --fatal-infos . | |
- name: Run unit tests | |
run: flutter test --concurrency=1 | |
- name: Run tests with downgraded app_links | |
run: | | |
flutter pub downgrade app_links | |
flutter test --concurrency=1 | |
- name: Build and test web (JS) | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
flutter test --platform chrome | |
cd example && flutter build web | |
- name: Build and test web (WASM) | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
flutter test --platform chrome --wasm | |
cd example && flutter build web --wasm | |
- name: Build macOS app | |
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
cd example | |
flutter build macos | |
- name: Build Windows app | |
if: ${{ matrix.os == 'windows-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
cd example | |
flutter build windows | |
- name: Build Linux app | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libgtk-3-dev libblkid-dev liblzma-dev | |
cd example | |
flutter build linux | |
- name: Build iOS app | |
if: ${{ matrix.os == 'macos-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
cd example | |
flutter build ios --no-codesign | |
- name: Build Android app | |
if: ${{ matrix.os == 'ubuntu-latest' && matrix.flutter-version == '3.x'}} | |
run: | | |
cd example | |
flutter build apk | |