Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/pana/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ inputs:
min_score:
required: false
type: number
default: 120
default: 100
pana_version:
required: false
type: string
Expand Down
41 changes: 32 additions & 9 deletions .github/workflows/check_db_entities.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
name: check_db_entities

on:
on:
pull_request:
paths:
- 'packages/stream_chat_persistence/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Centralizes every gating decision for this workflow — currently just a
# path filter. Downstream jobs only need a single
# `if: needs.gate.outputs.should_run == 'true'`. A job skipped this way
# reports `success` to branch protection (vs. `on.paths` filtering, which
# hangs forever) — see
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks
gate:
runs-on: ubuntu-latest
outputs:
should_run: ${{ steps.filter.outputs.persistence }}
steps:
- name: 📥 Checkout
uses: actions/checkout@v6

- name: 🛤️ Detect Path Changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
persistence:
- 'packages/stream_chat_persistence/**'
- '.github/workflows/check_db_entities.yml'

check_entity_modifications:
needs: gate
if: needs.gate.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- name: 📥 Checkout
Expand All @@ -24,22 +47,22 @@ jobs:
ENTITY_DIR="packages/stream_chat_persistence/lib/src/entity"
TEMP_FILE="modified_entities"
BASE_BRANCH="${{ github.base_ref }}"

echo "Using base branch: origin/$BASE_BRANCH for comparison"

# Check if any entity files have changed compared to the base branch
git diff-index --name-only origin/$BASE_BRANCH -- $ENTITY_DIR | grep -E '\.dart$' > $TEMP_FILE || true

if [ ! -s "$TEMP_FILE" ]; then
echo "✅ No entity files changed."
echo "has_changes=false" >> $GITHUB_OUTPUT
rm $TEMP_FILE
exit 0
fi

echo "⚠️ Entity files modified:"
cat $TEMP_FILE

# Set modified files as output
echo "modified_files<<EOF" >> $GITHUB_OUTPUT
cat $TEMP_FILE >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -74,4 +97,4 @@ jobs:
2. Update entity schema tests if necessary.

*Note: This comment is automatically generated by the CI workflow.*
edit-mode: replace
edit-mode: replace
5 changes: 4 additions & 1 deletion .github/workflows/distribute_external.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,17 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.3'

- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: "Disable Swift Package Manager"
run: flutter config --no-enable-swift-package-manager

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
20 changes: 13 additions & 7 deletions .github/workflows/distribute_internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,20 +116,23 @@ jobs:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '26.3'

- name: "Install Flutter"
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}


- name: "Disable Swift Package Manager"
run: flutter config --no-enable-swift-package-manager

- name: "Install Tools"
run: flutter pub global activate melos

- name: "Bootstrap Workspace"
run: melos bootstrap

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down Expand Up @@ -174,13 +177,16 @@ jobs:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}


- name: "Disable Swift Package Manager"
run: flutter config --no-enable-swift-package-manager

- name: "Install Tools"
run: flutter pub global activate melos

- name: "Bootstrap Workspace"
run: melos bootstrap

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
Expand Down
37 changes: 29 additions & 8 deletions .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,50 @@ on:
push:
branches:
- master
paths:
- 'packages/**'
- '.github/workflows/legacy_version_analyze.yml'
pull_request:
branches:
- master
paths:
- 'packages/**'
- '.github/workflows/legacy_version_analyze.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
# Centralizes every gating decision for this workflow — path filter, draft
# state, and push-vs-PR semantics. Downstream jobs only need a single
# `if: needs.gate.outputs.should_run == 'true'`. A job skipped this way
# reports `success` to branch protection (vs. `on.paths` filtering, which
# hangs forever) — see
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks
gate:
runs-on: ubuntu-latest
outputs:
should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.packages == 'true' && github.event.pull_request.draft != true) }}
steps:
# paths-filter needs a checkout on push events (it diffs against the
# previous commit via git history). On pull_request events it uses
# the API and the checkout is unused, but is cheap.
- name: "Git Checkout"
uses: actions/checkout@v6

- name: "Detect Path Changes"
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
packages:
- 'packages/**'
- '.github/workflows/legacy_version_analyze.yml'

# Does a sanity check that packages at least pass analysis on the N-1
# versions of Flutter stable if the package claims to support that version.
# This is to minimize accidentally making changes that break old versions
# (which we don't commit to supporting, but don't want to actively break)
# without updating the constraints.
analyze_legacy_versions:
needs: gate
if: needs.gate.outputs.should_run == 'true'
timeout-minutes: 15
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
Expand All @@ -47,4 +68,4 @@ jobs:
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

- name: 📊 Analyze and test packages
uses: ./.github/actions/package_analysis
uses: ./.github/actions/package_analysis
10 changes: 5 additions & 5 deletions .github/workflows/pana.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
uses: ./.github/actions/pana
with:
working_directory: packages/stream_chat
min_score: 120
min_score: 100

stream_chat_persistence:
runs-on: ubuntu-latest
Expand All @@ -33,7 +33,7 @@ jobs:
uses: ./.github/actions/pana
with:
working_directory: packages/stream_chat_persistence
min_score: 120
min_score: 100

stream_chat_flutter_core:
runs-on: ubuntu-latest
Expand All @@ -44,7 +44,7 @@ jobs:
uses: ./.github/actions/pana
with:
working_directory: packages/stream_chat_flutter_core
min_score: 120
min_score: 100

stream_chat_flutter:
runs-on: ubuntu-latest
Expand All @@ -55,7 +55,7 @@ jobs:
uses: ./.github/actions/pana
with:
working_directory: packages/stream_chat_flutter
min_score: 120
min_score: 100

stream_chat_localizations:
runs-on: ubuntu-latest
Expand All @@ -66,4 +66,4 @@ jobs:
uses: ./.github/actions/pana
with:
working_directory: packages/stream_chat_localizations
min_score: 120
min_score: 100
52 changes: 35 additions & 17 deletions .github/workflows/stream_flutter_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ env:

on:
pull_request:
paths:
- 'packages/**'
- 'sample_app/**'
- '.github/workflows/stream_flutter_workflow.yml'
types:
- opened
- reopened
Expand All @@ -24,9 +20,37 @@ concurrency:
cancel-in-progress: true

jobs:
# Centralizes every gating decision for this workflow — path filter,
# draft state, and push-vs-PR semantics. Downstream jobs only need a
# single `if: needs.gate.outputs.should_run == 'true'`. A job skipped
# this way reports `success` to branch protection (vs. `on.paths`
# filtering, which hangs forever) — see
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks
#
# `push` events to master always run the full suite, matching the
# previous `on.push.branches: [master]` behavior.
gate:
runs-on: ubuntu-latest
outputs:
should_run: ${{ github.event_name == 'push' || (steps.filter.outputs.relevant == 'true' && github.event.pull_request.draft != true) }}
steps:
- name: "Git Checkout"
uses: actions/checkout@v6

- name: "Detect Path Changes"
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
relevant:
- 'packages/**'
- 'sample_app/**'
- '.github/workflows/stream_flutter_workflow.yml'

analyze:
needs: gate
timeout-minutes: 15
if: github.event.pull_request.draft == false
if: needs.gate.outputs.should_run == 'true'
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
Expand All @@ -53,8 +77,9 @@ jobs:
melos run lint:pub

format:
needs: gate
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
if: needs.gate.outputs.should_run == 'true'
timeout-minutes: 15
steps:
- name: "Git Checkout"
Expand All @@ -79,8 +104,9 @@ jobs:
./.github/workflows/scripts/validate-formatting.sh

test:
needs: gate
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
if: needs.gate.outputs.should_run == 'true'
timeout-minutes: 30
steps:
- name: "Git Checkout"
Expand Down Expand Up @@ -139,8 +165,9 @@ jobs:

build:
name: build (${{ matrix.platform }})
needs: gate
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
if: needs.gate.outputs.should_run == 'true'
timeout-minutes: 30
strategy:
fail-fast: false
Expand Down Expand Up @@ -182,12 +209,3 @@ jobs:
- name: "Build ${{ matrix.platform }} App"
working-directory: ${{ matrix.working-directory }}
run: ${{ matrix.build-command }}

draft-build:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == true
timeout-minutes: 1

steps:
- name: Run a one-line script
run: echo Draft PR, you are good.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ GeneratedPluginRegistrant.*
**/ios/Flutter/flutter_export_environment.sh
**/ios/ServiceDefinitions.json
**/ios/Runner/GeneratedPluginRegistrant.*
**/ios/Flutter/ephemeral/**
Podfile.lock

# Exceptions to iOS rules
Expand Down
2 changes: 1 addition & 1 deletion melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ command:
equatable: ^2.0.8
ezanimation: ^0.6.0
firebase_core: ^4.0.0
firebase_crashlytics: ^5.2.0
firebase_messaging: ^16.0.0
file_picker: ^11.0.0
file_selector: ^1.1.0
Expand Down Expand Up @@ -86,7 +87,6 @@ command:
record: ^6.2.0
responsive_builder: ^0.7.0
rxdart: ^0.28.0
sentry_flutter: ^8.3.0
share_plus: ">=12.0.2 <14.0.0"
shimmer: ^3.0.0
sqlite3_flutter_libs: ^0.5.26
Expand Down
Loading