Skip to content

Feature/settings redesign #285

Feature/settings redesign

Feature/settings redesign #285

Workflow file for this run

name: Sossoldi Flutter CI
on:
pull_request:
push:
env:
ANDROID_KEYSTORE_PASSWORD: ${{ secrets.ANDROID_KEYSTORE_PASSWORD }}
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
concurrency:
group: ${{ github.head_ref != '' && github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
format-test-build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup FVM
uses: kuhnroyal/flutter-fvm-config-action/config@v3
id: fvm-config-action
- name: Flutter action
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: flutter-${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
cache-path: ${{ runner.tool_cache }}/flutter
- name: Check versions
run: |
flutter --version
dart --version
- name: Get dependencies
run: flutter pub get
- name: Run build_runner
run: |
dart run build_runner build --delete-conflicting-outputs
- name: Check formatting
run: |
echo "Checking code formatting (default line length 80)..."
if ! dart format --set-exit-if-changed --output=none .; then
echo "⛔ ERROR: Code format check failed. Please run 'dart format .' on your code and commit the formatted changes."
exit 1
else
echo "✅ Code format check passed."
fi
- name: Run tests
run: flutter test --concurrency=1
- name: Dump keystore
if: github.event_name == 'push'
uses: timheuer/base64-to-file@v1.2.4
with:
fileName: keystore.jks
fileDir: android/app
encodedString: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
- name: Create key.properties
if: github.event_name == 'push'
run: |
cat > android/key.properties <<EOF
storeFile=keystore.jks
storePassword=${ANDROID_KEYSTORE_PASSWORD}
keyAlias=${ANDROID_KEY_ALIAS}
keyPassword=${ANDROID_KEY_PASSWORD}
EOF
- name: Build APK and App Bundle
if: github.event_name == 'push'
run: |
flutter build appbundle --flavor default