Skip to content

feat: add ci for all bricks #60

feat: add ci for all bricks

feat: add ci for all bricks #60

name: formigas_feature brick CI
on:
pull_request:
paths:
- formigas_feature/**
- .github/workflows/continuous-integration-formigas_feature.yaml
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.24.2
cache: true
- name: Install Mason CLI
run: dart pub global activate mason_cli
- name: Initialize Mason
run: mason init
- name: create flutter project
run: flutter create my_app --empty --template=app --platforms=android --no-pub
- name: Add formigas_feature with mason
run: mason add formigas_feature --path ./formigas_feature
- name: Make formigas_feature
run: mason make formigas_feature --feature_name=formigas_feature --use_freezed=true
working-directory: my_app
- name: Check code formatting
run: dart format -o none --set-exit-if-changed lib/ test/
working-directory: my_app/lib/
- name: Analyze code
# This might fail with a sorting import error if the project_name is set to something different than `my_app` during development
run: flutter analyze --fatal-infos --fatal-warnings
working-directory: my_app/lib/
- name: Run tests
run: flutter test
working-directory: my_app
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'gradle'
- name: Analyze files
run: flutter build appbundle
working-directory: my_app