Skip to content

Update android, ios #32

Update android, ios

Update android, ios #32

name: Pre-merge checks
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master
jobs:
test-publish:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
# Set up Flutter
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.38.5' # Specify exact version instead of just 'stable'
channel: 'stable'
# Cache Flutter dependencies to speed up workflow
- name: Cache Flutter dependencies
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
# Install dependencies
- name: Install dependencies
run: flutter pub get
# Run tests
- name: Run tests
run: flutter test
# Static code analysis
- name: Analyze code
run: flutter analyze --no-fatal-warnings
# Verify package format is correct
- name: Format check
run: dart format --set-exit-if-changed .
# Verify package
- name: Verify package
run: flutter pub publish --dry-run
# Check if package can be published
- name: Check publication readiness
run: flutter pub publish --dry-run