Skip to content

Commit

Permalink
updated yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ygit committed Oct 30, 2023
1 parent 7358b7a commit 3f9c210
Show file tree
Hide file tree
Showing 3 changed files with 82 additions and 3 deletions.
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 }}

0 comments on commit 3f9c210

Please sign in to comment.