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 for Dart, Kotlin & Swift languages #1616

Merged
merged 6 commits into from
Oct 31, 2023
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
27 changes: 24 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ on:
branches:
- main
- develop
paths:
- "**/*.dart"
paths-ignore:
- "**.md"
- doc/**
Expand All @@ -27,23 +29,42 @@ 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: cd packages/hmssdk_flutter; dart fix --apply
- name: Flutter Analyze in HMSSDK
uses: invertase/github-action-dart-analyzer@v1
with:
working-directory: packages/hmssdk_flutter
- name: Flutter Analyze in Room Kit
uses: invertase/github-action-dart-analyzer@v1
with:
working-directory: packages/hms_room_kit
- 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
35 changes: 35 additions & 0 deletions .github/workflows/ktlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: KtLint

on:
workflow_dispatch:
pull_request:
paths:
- "**/*.kt"

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

permissions: read-all

jobs:
KtLint:
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
27 changes: 27 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: SwiftLint

on:
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 }}