Skip to content

Update card fields

Update card fields #1

Workflow file for this run

name: CI
# This workflow runs on:
# - Push to master/develop branches and custom feature branches
# - Pull requests from any branch to any branch
# - Manual workflow dispatch from any branch
# Resource-intensive jobs are optimized to run only on master/develop branches and PRs
on:
push:
branches:
- master
- develop
- 'feature/**'
- 'bugfix/**'
- 'hotfix/**'
- 'release/**'
- 'chore/**'
- 'test/**'
- 'ci/**'
pull_request:
# Run CI for PRs from any branch to any branch
workflow_dispatch:
# Allow manual triggering from any branch
jobs:
test:
runs-on: ubuntu-latest
name: Test on Ubuntu
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Verify formatting
run: dart format --output=none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze --fatal-infos
- name: Run tests
run: flutter test --coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage/lcov.info
name: flutter_wallet_card
fail_ci_if_error: false
test-ios:
runs-on: macos-latest
name: Test on macOS (iOS)
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Run iOS tests
run: flutter test
- name: Build iOS example
run: |
cd example
flutter build ios --no-codesign
test-android:
runs-on: ubuntu-latest
name: Test on Ubuntu (Android)
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Run Android tests
run: flutter test
- name: Build Android example
run: |
cd example
flutter build apk --android-skip-build-dependency-validation
package-analysis:
runs-on: ubuntu-latest
name: Package Analysis
# Run package analysis on master branches and PRs
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Check package dependencies
run: flutter pub deps
- name: Analyze package
run: dart pub publish --dry-run
- name: Check package score
run: |
dart pub global activate pana
dart pub global run pana --no-warning .
security-scan:
runs-on: ubuntu-latest
name: Security Scan
# Run security scans on master branches and PRs
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Run security audit
run: |
dart pub deps --json > deps.json
# Check for known vulnerabilities in dependencies
if command -v osv-scanner &> /dev/null; then
osv-scanner --lockfile=pubspec.lock
else
echo "OSV Scanner not available, skipping vulnerability check"
fi
example-app:
runs-on: ubuntu-latest
name: Example App Build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.32.0'
channel: 'stable'
cache: true
- name: Install dependencies
run: |
flutter pub get
cd example
flutter pub get
- name: Test example app
run: |
cd example
flutter test
- name: Build example app (Android)
run: |
cd example
flutter build apk --debug
- name: Upload example APK
uses: actions/upload-artifact@v4
with:
name: example-app-debug.apk
path: example/build/app/outputs/flutter-apk/app-debug.apk
retention-days: 7
compatibility-check:
runs-on: ubuntu-latest
name: Flutter Version Compatibility
# Only run compatibility checks on master branches to save CI resources
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.event_name == 'pull_request'
strategy:
matrix:
flutter-version: ['3.32.0']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Flutter ${{ matrix.flutter-version }}
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ matrix.flutter-version }}
channel: 'stable'
cache: true
- name: Install dependencies
run: flutter pub get
- name: Run tests with Flutter ${{ matrix.flutter-version }}
run: flutter test
- name: Build with Flutter ${{ matrix.flutter-version }}
run: |
cd example
flutter pub get
flutter build apk --debug