Skip to content

Commit

Permalink
Merge branch 'main' into modified-throttler
Browse files Browse the repository at this point in the history
* main: (154 commits)
  Unblock release on workflow dispatch (GetStream#3389)
  [CI] Run release action on workflow dispatch (GetStream#3386)
  [CI] Do not unshallow branches on CI
  [CI] Do not unshallow branches on CI
  [CI] Update git config on merging develop and release branches
  [CI] Update git config on merging develop and release branches
  [CI] Pull origin release branch on release
  [CI] Pull origin release branch on release
  [CI] Fetch all branches on release (GetStream#3385)
  [CI] Fetch all branches on release (GetStream#3385)
  Bump 4.62.0
  Store pending message along with regular messages (GetStream#3378)
  [CI] Set up a default base branch when automatically creating PRs (GetStream#3383)
  Fix reading the local database state just after the initial write (GetStream#3373)
  [CI] Add space to SDK size badge (GetStream#3379)
  Update channel type documentation to reflect allowed characters (GetStream#3377)
  Reuse CurrentChatUserController instead of recreating it when sending typing events (GetStream#3372)
  Run offline state sync in the background (GetStream#3367)
  [CI] Bump fastlane plugin version (GetStream#3376)
  [CI] Bump fastlane actions plugin (GetStream#3375)
  ...
  • Loading branch information
glennposadas committed Sep 7, 2024
2 parents 34dfbb8 + c14c5a1 commit b622406
Show file tree
Hide file tree
Showing 676 changed files with 17,843 additions and 9,519 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ _Explain how this change can be tested manually, if applicable._
### ☑️ Contributor Checklist

- [ ] I have signed the [Stream CLA](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) (required)
- [ ] This change follows zero ⚠️ policy (required)
- [x] This change should be manually QAed
- [ ] Changelog is updated with client-facing changes
- [ ] Changelog is updated with new localization keys
- [ ] New code is covered by unit tests
- [ ] Comparison screenshots added for visual changes
- [ ] Affected documentation updated (docusaurus, tutorial, CMS)
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/bootstrap/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ runs:
- run: echo "$HOME/.mint/bin" >> $GITHUB_PATH
shell: bash
- name: Cache Mint
uses: actions/cache@v3
uses: actions/cache@v4
id: mint-cache
with:
path: ~/.mint
key: ${{ env.IMAGE }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: ${{ env.IMAGE }}-mint-
- name: Cache brew
uses: actions/cache@v3
uses: actions/cache@v4
id: brew-cache
with:
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/python-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ runs:
with:
python-version: 3.11
cache: 'pip'
- run: pip install -r requirements.txt
- run: pip3 install -r requirements.txt --break-system-packages
shell: bash
32 changes: 32 additions & 0 deletions .github/actions/setup-ios-runtime/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Setup iOS Runtime'
description: 'Download and Install requested iOS Runtime'
runs:
using: "composite"
steps:
- name: Cache iOS Simulator Runtime
uses: actions/cache@v4
id: runtime-cache
with:
path: ./*.dmg
key: ipsw-runtime-ios-${{ inputs.version }}
restore-keys: ipsw-runtime-ios-${{ inputs.version }}
- name: Setup iOS Simulator Runtime
shell: bash
run: |
brew install blacktop/tap/ipsw
bundle exec fastlane install_runtime ios:${{ inputs.version }}
xcrun simctl list runtimes
- name: Create Custom iOS Simulator
shell: bash
run: |
ios_version_dash=$(echo "${{ inputs.version }}" | tr '.' '-') # ex: 16.4 -> 16-4
xcrun simctl create custom-test-device "${{ inputs.device }}" "com.apple.CoreSimulator.SimRuntime.iOS-$ios_version_dash"
xcrun simctl list devices ${{ inputs.version }}
inputs:
version:
description: "iOS Runtime Version"
required: true
device:
description: "iOS Simulator Model"
required: true
2 changes: 1 addition & 1 deletion .github/actions/xcode-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
- run: echo "$HOME/.mint/bin" >> $GITHUB_PATH
shell: bash
- name: Cache SPM
uses: actions/cache@v3
uses: actions/cache@v4
id: spm-cache
with:
path: spm_cache
Expand Down
105 changes: 41 additions & 64 deletions .github/workflows/cron-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Cron Checks

on:
schedule:
# Runs "At 03:00 every night"
- cron: '0 3 * * *'
# Runs "At 03:00 every night except weekends"
- cron: '0 3 * * 1-5'

workflow_dispatch:

Expand All @@ -13,6 +13,7 @@ concurrency:

env:
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build-test-app-and-frameworks:
Expand All @@ -25,7 +26,7 @@ jobs:
- name: Build
run: bundle exec fastlane build_test_app_and_frameworks
timeout-minutes: 60
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: success()
with:
name: cache-derived-data
Expand All @@ -41,63 +42,46 @@ jobs:
matrix:
include:
- ios: 17.4
xcode: 15.3
xcode: 15.4
os: macos-14
device: "iPhone 15 Pro"
device: "iPhone 14 Pro"
setup_runtime: false
- ios: 16.4
xcode: 15.3
os: macos-14
device: "iPhone 14 Pro Max"
device: "iPhone 14 Pro"
setup_runtime: true
- ios: 15.4
- ios: 15.5
xcode: 15.3
os: macos-14
device: "iPhone 8"
setup_runtime: true
- ios: 14.5
xcode: 15.3
os: macos-14
device: "iPhone SE (2nd generation)"
setup_runtime: true
- ios: 13.7
xcode: 15.3
os: macos-14
device: "iPad Air (3rd generation)"
device: "iPhone 13 Pro"
setup_runtime: true
fail-fast: false
runs-on: ${{ matrix.os }}
env:
GITHUB_EVENT: ${{ toJson(github.event) }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
STREAM_DEMO_APP_SECRET: ${{ secrets.STREAM_DEMO_APP_SECRET }}
XCODE_VERSION: ${{ matrix.xcode }}
IOS_SIMULATOR_DEVICE: "${{ matrix.device }} (${{ matrix.ios }})" # For the Allure report
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: cache-derived-data
path: derived_data/Build/
- uses: ./.github/actions/bootstrap
env:
INSTALL_ALLURE: true
INSTALL_YEETD: true
- name: Cache iOS Simulator Runtime
uses: actions/cache@v3
id: runtime-cache
with:
path: ~/Downloads/*.dmg
key: xcodes-runtime-ios-${{ matrix.ios }}
restore-keys: xcodes-runtime-ios-${{ matrix.ios }}
- name: Setup iOS ${{ matrix.ios }} Runtime
SKIP_MINT_BOOTSTRAP: true
SKIP_BREW_BOOTSTRAP: true
- uses: ./.github/actions/setup-ios-runtime
if: ${{ matrix.setup_runtime }}
timeout-minutes: 60
run: |
brew install xcodesorg/made/xcodes
xcodes runtimes
sudo xcodes runtimes install 'iOS ${{ matrix.ios }}' --keep-archive
with:
version: ${{ matrix.ios }}
device: ${{ matrix.device }}
- name: Launch Allure TestOps
run: bundle exec fastlane allure_launch cron:true
- name: Run UI Tests (Debug)
Expand All @@ -124,7 +108,7 @@ jobs:
run: |
brew install chargepoint/xcparse/xcparse
xcparse logs fastlane/test_output/StreamChatUITestsApp.xcresult fastlane/test_output/logs/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Test Data E2E (iOS ${{ matrix.ios }})
Expand All @@ -140,54 +124,48 @@ jobs:
matrix:
include:
- ios: 17.4
xcode: 15.3
xcode: 15.4
os: macos-14
device: "iPhone 14 Pro Max"
device: "iPhone 14 Pro"
setup_runtime: false
- ios: 16.4
xcode: 15.3
os: macos-14
device: "iPhone 14 Pro Max"
device: "iPhone 14 Pro"
setup_runtime: true
- ios: 15.4
- ios: 15.5
xcode: 15.3
os: macos-14
device: "iPhone 8"
device: "iPhone 13 Pro"
setup_runtime: true
- ios: 14.5
xcode: 15.3
os: macos-14
device: "iPhone SE (2nd generation)"
xcode: 14.2
os: macos-12
device: "iPhone 12 Pro"
setup_runtime: true
- ios: 13.7
xcode: 15.3
os: macos-14
device: "iPad Air (3rd generation)"
xcode: 14.2
os: macos-12
device: "iPhone 11 Pro"
setup_runtime: true
fail-fast: false
runs-on: ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
XCODE_VERSION: ${{ matrix.xcode }}
steps:
- uses: actions/checkout@v4.1.1
- uses: ./.github/actions/bootstrap
env:
INSTALL_YEETD: true
- name: Cache iOS Simulator Runtime
uses: actions/cache@v3
id: runtime-cache
with:
path: ~/Downloads/*.dmg
key: xcodes-runtime-ios-${{ matrix.ios }}
restore-keys: xcodes-runtime-ios-${{ matrix.ios }}
- name: Setup iOS ${{ matrix.ios }} Runtime
- uses: ./.github/actions/setup-ios-runtime
if: ${{ matrix.setup_runtime }}
timeout-minutes: 60
run: |
brew install xcodesorg/made/xcodes
xcodes runtimes
sudo xcodes runtimes install 'iOS ${{ matrix.ios }}' --keep-archive
with:
version: ${{ matrix.ios }}
device: ${{ matrix.device }}
- name: Run LLC Tests (Debug)
run: bundle exec fastlane test device:"${{ matrix.device }} (${{ matrix.ios }})" cron:true
timeout-minutes: 100
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
Expand All @@ -203,7 +181,7 @@ jobs:
run: |
brew install chargepoint/xcparse/xcparse
xcparse logs fastlane/test_output/StreamChat.xcresult fastlane/test_output/logs/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: failure()
with:
name: Test Data LLC (iOS ${{ matrix.ios }})
Expand All @@ -216,22 +194,21 @@ jobs:
runs-on: macos-12
env:
XCODE_VERSION: "14.0.1"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- uses: actions/checkout@v4.1.1
- uses: ./.github/actions/ruby-cache
- name: List Xcode versions xcversion sees
- name: List Xcode versions
run: mdfind "kMDItemCFBundleIdentifier = 'com.apple.dt.Xcode'"
- name: Build LLC
run: bundle exec fastlane test device:"iPhone 8" build_for_testing:true
timeout-minutes: 25
- name: Build UI
run: bundle exec fastlane test_ui device:"iPhone 8" build_for_testing:true
timeout-minutes: 25
- name: Install Bot SSH Key
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
- name: Build XCFrameworks
run: bundle exec fastlane build_xcframeworks
timeout-minutes: 25
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/release-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Merge release"

on:
issue_comment:
types: [created]

workflow_dispatch:

jobs:
merge-comment:
name: Merge release to main
runs-on: macos-14
if: github.event_name == 'workflow_dispatch' || (github.event.issue.pull_request && github.event.issue.state == 'open' && github.event.comment.body == '/merge release')
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}

- uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- uses: ./.github/actions/ruby-cache

- name: Merge
run: bundle exec fastlane merge_release_to_main author:"$USER_LOGIN" --verbose
env:
GITHUB_TOKEN: ${{ secrets.ADMIN_API_TOKEN }} # A token with the "admin:org" scope to get the list of the team members on GitHub
GITHUB_PR_NUM: ${{ github.event.issue.number }}
USER_LOGIN: ${{ github.event.comment.user.login != null && github.event.comment.user.login || github.event.sender.login }}
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,50 @@ on:
types:
- closed

workflow_dispatch:
inputs:
version:
description: 'Release version'
type: string
required: true

jobs:
release:
name: Publish new release
runs-on: macos-12
if: github.event.pull_request.merged == true # only merged pull requests must trigger this job
if: ${{ github.event_name == 'workflow_dispatch' || github.event.pull_request.merged == true }} # only merged pull requests must trigger this job
steps:
- name: Install Bot SSH Key
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}

- uses: actions/checkout@v4.1.1

- uses: ./.github/actions/ruby-cache

- name: Extract version from input (for workflow dispatch)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
if [ "$BRANCH_NAME" != "main" ]; then
echo "This workflow can only be run on the main branch."
exit 1
fi
echo "RELEASE_VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
- name: Extract version from branch name (for release branches)
if: startsWith(github.event.pull_request.head.ref, 'release/')
if: ${{ github.event_name == 'pull_request' && startsWith(github.event.pull_request.head.ref, 'release/') }}
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
VERSION=${BRANCH_NAME#release/}
echo "RELEASE_VERSION=$VERSION" >> $GITHUB_ENV
- uses: ./.github/actions/ruby-cache
- name: "Fastlane - Publish Release"
if: startsWith(github.event.pull_request.head.ref, 'release/')
if: ${{ github.event_name == 'workflow_dispatch' || startsWith(github.event.pull_request.head.ref, 'release/') }}
env:
GITHUB_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
run: bundle exec fastlane publish_release version:${{ env.RELEASE_VERSION }} --verbose

Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Start new release
runs-on: macos-14
steps:
- name: Install Bot SSH Key
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
with:
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
Expand Down
Loading

0 comments on commit b622406

Please sign in to comment.