Skip to content

Native bjj migration #872

Native bjj migration

Native bjj migration #872

name: polygonid_flutter_sdk
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
workflow_dispatch:
# 4 jobs are configured:
# 1. common: runs setup, clean, generate, format, analyze, test and reports
# 2. ios: runs tests on iOS devices
# 3. android: runs tests on Android devices
# 4. publish: publishes the package to pub.dev (only dry run)
jobs:
common:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: '3.24.4'
channel: 'stable'
cache: true
# instead of "channel: stable", you could be more precise by specifying the exact version of Flutter you're using:
# flutter-version: '<FLUTTER_VERSION>'
- name: Verify Flutter version
run: flutter --version
- name: Clean, dependencies and generate for SDK
run: flutter clean&&flutter pub get&&dart run build_runner build --delete-conflicting-outputs
- name: Clean, dependencies and generate for Example
env:
DEFAULT_ENV: ${{ secrets.DEFAULT_ENV }}
STACKTRACE_ENCRYPTION_KEY: ${{ secrets.STACKTRACE_ENCRYPTION }}
PINATA_GATEWAY: ${{ secrets.PINATA_GATEWAY }}
PINATA_GATEWAY_TOKEN: ${{ secrets.PINATA_GATEWAY_TOKEN }}
run: cd example&&flutter clean&&flutter pub get&&dart run build_runner build --delete-conflicting-outputs
- name: Format
run: dart format --set-exit-if-changed lib test example
- name: Analyze
run: flutter analyze lib test example
- name: Run tests
run: flutter test --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# job responsible for publishing the package to pub.dev
# enable it once published for the first time on pub.dev otherwise it will fail
#publish:
# needs: [ common ] #, ios , android ]
# runs-on: ubuntu-latest
# steps:
# - name: Publish dry run
# if: github.base_ref == 'main'
# run: flutter pub publish --dry-run