# Generated by shorebird_ci --style static. Safe to edit. # Reusable workflow: CI steps for a single Flutter package. on: workflow_call: inputs: package_name: required: true type: string package_path: required: true type: string flutter_version: required: false default: "" type: string has_bloc_lint: required: false default: false type: boolean has_integration_tests: required: false default: false type: boolean has_unit_tests: required: false default: true type: boolean subpackages: required: false default: "" type: string jobs: ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 with: submodules: recursive - name: Setup Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ inputs.flutter_version || '' }} channel: ${{ inputs.flutter_version && '' || 'stable' }} - name: Setup Bloc Tools if: inputs.has_bloc_lint uses: felangel/setup-bloc-tools@v0 - name: Install Dependencies working-directory: ${{ inputs.package_path }} run: | flutter pub get --no-example for sub in ${{ inputs.subpackages }}; do flutter pub get --no-example -C $sub done - working-directory: ${{ inputs.package_path }} run: dart format --set-exit-if-changed . - working-directory: ${{ inputs.package_path }} run: flutter analyze . - name: Bloc Lint if: inputs.has_bloc_lint working-directory: ${{ inputs.package_path }} run: bloc lint . - if: inputs.has_unit_tests working-directory: ${{ inputs.package_path }} run: flutter test --coverage - if: inputs.has_unit_tests uses: codecov/codecov-action@v6 with: flags: ${{ inputs.package_name }} working-directory: ${{ inputs.package_path }} - name: Integration Tests if: inputs.has_integration_tests working-directory: ${{ inputs.package_path }} run: flutter test integration_test