Skip to content

ci: setup checks and tests workflows #18

ci: setup checks and tests workflows

ci: setup checks and tests workflows #18

Workflow file for this run

name: ✅ Code Quality Checks
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
checks:
name: 🔍 Code Quality and Formatting Verification
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 📥 Checkout Repository
uses: actions/checkout@v4
- name: 🛠️ Setup Flutter (Stable)
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- name: 📦 Install All Package Dependencies
run: dart ./scripts/pub_get.dart
- name: 📦 Install Example Project Dependencies
run: flutter pub get -C quill_native_bridge/example
- name: 🎨 Perform Flutter Analysis
run: flutter analyze --write=flutter_analyze.log
- if: ${{ !cancelled() }}
uses: yorifuji/flutter-analyze-commenter@v1
with:
analyze-log: flutter_analyze.log
verbose: false
- name: 🔎 Validate Dart Code Formatting
run: dart format --set-exit-if-changed .
- name: 🔄 Preview Potential Dart Fixes
run: dart fix --dry-run
- name: 📦 Verify Package Readiness for Publishing
run: dart ./scripts/publish_dry_run.dart
# Ktlint: https://github.com/pinterest/ktlint
- name: 🎨 Verify Kotlin Code Style with Ktlint
uses: ScaCap/action-ktlint@master
with:
github_token: ${{ secrets.github_token }}
reporter: github-pr-review
fail_on_error: true
- name: 🛠️ Setup Swift
uses: swift-actions/setup-swift@v2
# https://github.com/swift-actions/setup-swift/issues/683
# with:
# swift-version: "6.0.0"
- name: 🔎 Validate Swift Code Formatting
run: |
VERSION=600.0.0
git clone --branch $VERSION --depth 1 https://github.com/swiftlang/swift-format.git
cd swift-format
swift build -c release
sudo mv .build/release/swift-format /usr/local/bin/
swift-format --version
swift-format lint -r quill_native_bridge_ios/ios/quill_native_bridge_ios
swift-format lint -r quill_native_bridge_macos/macos/quill_native_bridge_macos
# SwiftLint: https://github.com/realm/SwiftLint
# - name: 🎨 Verify Swift Code Style with SwiftLint
# uses: norio-nomura/[email protected]