Skip to content

chore(repo): Add beta analysis #2267

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 28, 2025
Merged
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
34 changes: 34 additions & 0 deletions .github/actions/package_analysis/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Package Analysis

runs:
using: "composite"
steps:
- name: "Install Tools"
shell: bash
run: flutter pub global activate melos

- name: "Bootstrap Workspace"
shell: bash
run: melos bootstrap --verbose

# Only analyze lib/; non-client code doesn't need to work on
# all supported legacy version.
- name: "Stream Chat Analyze"
shell: bash
run: cd packages/stream_chat/lib && dart analyze --fatal-infos . && cd .. && flutter test --exclude-tags golden

- name: "Stream Chat Flutter Core Analyze"
shell: bash
run: cd packages/stream_chat_flutter_core/lib && dart analyze --fatal-infos . && cd .. && flutter test --exclude-tags golden

- name: "Stream Chat Flutter Analyze"
shell: bash
run: cd packages/stream_chat_flutter/lib && dart analyze --fatal-infos . && cd .. && flutter test --exclude-tags golden

- name: "Stream Chat Persistence Analyze"
shell: bash
run: cd packages/stream_chat_persistence/lib && dart analyze --fatal-infos . && cd .. && flutter test --exclude-tags golden

- name: "Stream Chat Localizations Analyze"
shell: bash
run: cd packages/stream_chat_localizations/lib && dart analyze --fatal-infos . && cd .. && flutter test --exclude-tags golden
43 changes: 43 additions & 0 deletions .github/workflows/beta_version_analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: beta_version_analyze

on:
schedule:
# Runs "At 02:00 every monday"
- cron: '0 2 * * 1'
workflow_dispatch:

jobs:
# Does a sanity check on packages for the next beta version so we are not surprised by any breaking changes.
analyze_beta_versions:
timeout-minutes: 15
runs-on: ubuntu-latest
steps:
- name: "Git Checkout"
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: 📊 Analyze and test packages
uses: ./.github/actions/package_analysis

slack:
name: Slack Report
runs-on: ubuntu-latest
needs: [analyze_beta_versions]
if: failure() && github.event_name == 'schedule'
steps:
- uses: 8398a7/action-slack@v3
with:
status: failure
text: "<@U08BMRSM8G5> The beta build for Flutter Chat failed. Please check the logs."
job_name: "${{ github.workflow }}: ${{ github.job }}"
fields: repo,commit,author,workflow
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_NIGHTLY_CHECKS }}
24 changes: 2 additions & 22 deletions .github/workflows/legacy_version_analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,25 +47,5 @@ jobs:
cache: true
cache-key: flutter-:os:-:channel:-:version:-:arch:-:hash:-${{ hashFiles('**/pubspec.lock') }}

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

- name: "Bootstrap Workspace"
run: melos bootstrap --verbose

# Only analyze lib/; non-client code doesn't need to work on
# all supported legacy version.
- name: "Stream Chat Analyze"
run: cd packages/stream_chat/lib && dart analyze --fatal-infos .

- name: "Stream Chat Flutter Core Analyze"
run: cd packages/stream_chat_flutter_core/lib && dart analyze --fatal-infos .

- name: "Stream Chat Flutter Analyze"
run: cd packages/stream_chat_flutter/lib && dart analyze --fatal-infos .

- name: "Stream Chat Persistence Analyze"
run: cd packages/stream_chat_persistence/lib && dart analyze --fatal-infos .

- name: "Stream Chat Localizations Analyze"
run: cd packages/stream_chat_localizations/lib && dart analyze --fatal-infos .
- name: 📊 Analyze and test packages
uses: ./.github/actions/package_analysis