Skip to content
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

Added GitHub actions to perform lint actions #1612

Closed
wants to merge 29 commits into from
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
21 changes: 18 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,38 @@ on:
- "**.txt"

jobs:
build_appbundle:
check_build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: zulu
java-version: 12.x
- uses: actions/checkout@v3
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Get Flutter dependencies in Core SDK
run: flutter pub get
working-directory: packages/hmssdk_flutter
- name: Dart Format
run: dart format .
- name: Dart Fix
run: dart fix --apply
- name: Flutter Analyze in HMSSDK
uses: zgosalvez/github-actions-analyze-dart@v2
with:
working-directory: packages/hmssdk_flutter
- name: Commit and Push changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 🤖 Automated Format and Fix
commit_user_name: 🤖 100ms Flutter Bot
- name: Build Android App Bundle
env:
FIREBASE_CONFIG: ${{ secrets.FIREBASE_CONFIG }}
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ktlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: KtLint

on:
# trunk-ignore(yamllint/empty-values)
workflow_dispatch:
pull_request:
paths:
- "**/*.kt"

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions: read-all

jobs:
SwiftLint:
runs-on: ubuntu-latest

permissions:
checks: write

steps:
- name: Install ktlint
run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/0.44.0/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/

- name: Run ktlint
run: |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml
continue-on-error: true

- uses: yutailang0119/action-ktlint@v3
with:
report-path: build/*.xml
continue-on-error: false
28 changes: 28 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: SwiftLint

on:
# trunk-ignore(yamllint/empty-values)
workflow_dispatch:
pull_request:
paths:
- "**/*.swift"

concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true

permissions: read-all

jobs:
SwiftLint:
runs-on: ubuntu-latest

permissions:
checks: write

steps:
- uses: actions/checkout@v4
- name: GitHub Action for SwiftLint
uses: norio-nomura/[email protected]
env:
DIFF_BASE: ${{ github.base_ref }}
3 changes: 2 additions & 1 deletion packages/hms_room_kit/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@
### 🚀 Added

- Large Room Support

- Enhanced Participants list to accommodate up to 20,000 peers in a room.

- Added recording state indicator: showcasing "initializing" and "running" states.
- Added `Lower Hand` Capability in Participant list
- Added `Lower Hand` Capability in Participant list

### Fixed

Expand Down
56 changes: 28 additions & 28 deletions packages/hms_room_kit/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,10 @@ packages:
dependency: "direct main"
description:
name: flutter_svg
sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
sha256: bfc7cc3c75fe1282e8ce2e056d8fd1533f1a6848b65c379b4a5e7a9b623d3371
url: "https://pub.dev"
source: hosted
version: "2.0.7"
version: "2.0.8"
flutter_test:
dependency: "direct dev"
description: flutter
Expand Down Expand Up @@ -282,10 +282,10 @@ packages:
dependency: transitive
description:
name: lottie
sha256: b8bdd54b488c54068c57d41ae85d02808da09e2bee8b8dd1f59f441e7efa60cd
sha256: a93542cc2d60a7057255405f62252533f8e8956e7e06754955669fd32fb4b216
url: "https://pub.dev"
source: hosted
version: "2.6.0"
version: "2.7.0"
matcher:
dependency: transitive
description:
Expand Down Expand Up @@ -354,10 +354,10 @@ packages:
dependency: transitive
description:
name: path_provider_android
sha256: "6b8b19bd80da4f11ce91b2d1fb931f3006911477cec227cce23d3253d80df3f1"
sha256: e595b98692943b4881b219f0a9e3945118d3c16bd7e2813f98ec6e532d905f72
url: "https://pub.dev"
source: hosted
version: "2.2.0"
version: "2.2.1"
path_provider_foundation:
dependency: transitive
description:
Expand Down Expand Up @@ -623,66 +623,66 @@ packages:
dependency: transitive
description:
name: url_launcher
sha256: "47e208a6711459d813ba18af120d9663c20bdf6985d6ad39fe165d2538378d27"
sha256: b1c9e98774adf8820c96fbc7ae3601231d324a7d5ebd8babe27b6dfac91357ba
url: "https://pub.dev"
source: hosted
version: "6.1.14"
version: "6.2.1"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: b04af59516ab45762b2ca6da40fa830d72d0f6045cd97744450b73493fa76330
sha256: "31222ffb0063171b526d3e569079cf1f8b294075ba323443fdc690842bfd4def"
url: "https://pub.dev"
source: hosted
version: "6.1.0"
version: "6.2.0"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "7c65021d5dee51813d652357bc65b8dd4a6177082a9966bc8ba6ee477baa795f"
sha256: "4ac97281cf60e2e8c5cc703b2b28528f9b50c8f7cebc71df6bdf0845f647268a"
url: "https://pub.dev"
source: hosted
version: "6.1.5"
version: "6.2.0"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: b651aad005e0cb06a01dbd84b428a301916dc75f0e7ea6165f80057fee2d8e8e
sha256: "9f2d390e096fdbe1e6e6256f97851e51afc2d9c423d3432f1d6a02a8a9a8b9fd"
url: "https://pub.dev"
source: hosted
version: "3.0.6"
version: "3.1.0"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: b55486791f666e62e0e8ff825e58a023fd6b1f71c49926483f1128d3bbd8fe88
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev"
source: hosted
version: "3.0.7"
version: "3.1.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "95465b39f83bfe95fcb9d174829d6476216f2d548b79c38ab2506e0458787618"
sha256: "980e8d9af422f477be6948bdfb68df8433be71f5743a188968b0c1b887807e50"
url: "https://pub.dev"
source: hosted
version: "2.1.5"
version: "2.2.0"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "2942294a500b4fa0b918685aff406773ba0a4cd34b7f42198742a94083020ce5"
sha256: "7fd2f55fe86cea2897b963e864dc01a7eb0719ecc65fcef4c1cc3d686d718bb2"
url: "https://pub.dev"
source: hosted
version: "2.0.20"
version: "2.2.0"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: "95fef3129dc7cfaba2bc3d5ba2e16063bb561fc6d78e63eee16162bc70029069"
sha256: "7754a1ad30ee896b265f8d14078b0513a4dba28d358eabb9d5f339886f4a1adc"
url: "https://pub.dev"
source: hosted
version: "3.0.8"
version: "3.1.0"
uuid:
dependency: transitive
description:
Expand All @@ -695,26 +695,26 @@ packages:
dependency: transitive
description:
name: vector_graphics
sha256: b16dadf7eb610e20da044c141b4a0199a5e8082ca21daba68322756f953ce714
sha256: "0f0c746dd2d6254a0057218ff980fc7f5670fd0fcf5e4db38a490d31eed4ad43"
url: "https://pub.dev"
source: hosted
version: "1.1.9"
version: "1.1.9+1"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: a4b01403d5c613db115e30e71eca33f7e9e09f2d3c52c3fb84e16333ecddc539
sha256: "0edf6d630d1bfd5589114138ed8fada3234deacc37966bec033d3047c29248b7"
url: "https://pub.dev"
source: hosted
version: "1.1.9"
version: "1.1.9+1"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: d26c0e2f237476426523eb25512e4c09fa27c6d33ed659a0e69d79e20b5dc47f
sha256: d24333727332d9bd20990f1483af4e09abdb9b1fc7c3db940b56ab5c42790c26
url: "https://pub.dev"
source: hosted
version: "1.1.9"
version: "1.1.9+1"
vector_math:
dependency: transitive
description:
Expand Down
4 changes: 2 additions & 2 deletions packages/hms_room_kit/lib/src/hmssdk_interactor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,9 @@ class HMSSDKInteractor {
}

Future<HMSPeer?> getPeer({required String peerId}) async {
List<HMSPeer>? peers = await hmsSDK.getPeers();
List<HMSPeer> peers = await hmsSDK.getPeers() ?? [];

return peers?.firstWhere((element) => element.peerId == peerId);
return peers.firstWhere((element) => element.peerId == peerId);
}

void changeTrackState(HMSTrack forRemoteTrack, bool mute,
Expand Down
17 changes: 7 additions & 10 deletions packages/hms_room_kit/lib/src/meeting/meeting_store.dart
Original file line number Diff line number Diff line change
Expand Up @@ -708,9 +708,10 @@ class MeetingStore extends ChangeNotifier
}
log("Calling refresh PeerList Method $peerListIterators");
peerListIterators.clear();
List<String>? offStageRoles = HMSRoomLayout.roleLayoutData?.screens
?.conferencing?.defaultConf?.elements?.onStageExp?.offStageRoles;
offStageRoles?.forEach((role) async {
List<String> offStageRoles = HMSRoomLayout.roleLayoutData?.screens
?.conferencing?.defaultConf?.elements?.onStageExp?.offStageRoles ??
[];
offStageRoles.forEach((role) async {
var peerListIterator = await _hmsSDKInteractor.getPeerListIterator(
peerListIteratorOptions:
PeerListIteratorOptions(limit: 10, byRoleName: role));
Expand Down Expand Up @@ -845,9 +846,7 @@ class MeetingStore extends ChangeNotifier
void setParticipantsList(List<HMSRole> roles) {
String? onStageRoles = HMSRoomLayout.roleLayoutData?.screens?.conferencing
?.defaultConf?.elements?.onStageExp?.onStageRole;
if (onStageRoles != null) {
participantsInMeetingMap[onStageRoles] = [];
}
participantsInMeetingMap[onStageRoles ?? ""] = [];
roles
.where((role) => role.publishSettings?.allowed.isNotEmpty ?? false)
.forEach((element) {
Expand All @@ -870,10 +869,8 @@ class MeetingStore extends ChangeNotifier
void getSpotlightPeer() async {
String? metadata =
await _hmsSessionStore?.getSessionMetadataForKey(key: "spotlight");
if (metadata != null) {
setPeerToSpotlight(metadata);
spotlightMetadata = metadata;
}
setPeerToSpotlight(metadata);
spotlightMetadata = metadata;
}

@override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ class _ParticipantsBottomSheetState extends State<ParticipantsBottomSheet> {
///which will be used while removing the peer from stage
if (isOnStageRole) {
if (peer.metadata != null) {
String? peerMetadata = peer.metadata;
if (peerMetadata?.contains("prevRole") ?? false) {
String peerMetadata = peer.metadata!;
if (peerMetadata.contains("prevRole")) {
String? previousRole =
jsonDecode(peer.metadata!)["prevRole"];
if (previousRole != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ class _ParticipantsViewAllBottomSheetState
///which will be used while removing the peer from stage
if (isOnStageRole) {
if (peer.metadata != null) {
String? peerMetadata = peer.metadata;
if (peerMetadata?.contains("prevRole") ?? false) {
String peerMetadata = peer.metadata!;
if (peerMetadata.contains("prevRole")) {
String? previousRole =
jsonDecode(peer.metadata!)["prevRole"];
if (previousRole != null) {
Expand Down
Loading