feat: add completion and devins lang support #471 #207
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # GitHub Actions Workflow for testing KMP projects (mpp-core and mpp-ui) | |
| # This workflow builds and tests the Kotlin Multiplatform modules | |
| # Triggered on push to master and pull requests | |
| name: KMP Test | |
| on: | |
| # Trigger the workflow on pushes to the 'master' branch | |
| push: | |
| branches: [ master ] | |
| paths: | |
| - 'mpp-core/**' | |
| - 'mpp-ui/**' | |
| - '.github/workflows/kmp-test.yml' | |
| # Trigger the workflow on any pull request | |
| pull_request: | |
| paths: | |
| - 'mpp-core/**' | |
| - 'mpp-ui/**' | |
| - '.github/workflows/kmp-test.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Build and test mpp-core | |
| test-mpp-core: | |
| name: Test mpp-core (KMP) | |
| runs-on: ubuntu-latest | |
| env: | |
| ANDROID_SDK_ROOT: ${{ github.workspace }}/android-sdk | |
| steps: | |
| # Free GitHub Actions Environment Disk Space | |
| - name: Maximize Build Space | |
| uses: jlumbroso/free-disk-space@main | |
| with: | |
| tool-cache: false | |
| large-packages: false | |
| - name: Setup Android SDK | |
| uses: android-actions/setup-android@v3 | |
| # Check out the current repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Validate wrapper | |
| - name: Gradle Wrapper Validation | |
| uses: gradle/actions/wrapper-validation@v4 | |
| # Set up Java environment | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| # Accept Android SDK licenses | |
| - name: Accept Android SDK licenses | |
| run: | | |
| yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
| - name: Write local.properties | |
| run: echo "sdk.dir=${ANDROID_SDK_ROOT}" > local.properties | |
| # Setup Gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # Grant execute permission for gradlew | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # Clean mpp-core module only (not the entire project) | |
| - name: Clean mpp-core | |
| run: ./gradlew :mpp-core:clean | |
| # Test mpp-core for all targets | |
| - name: Test mpp-core | |
| run: ./gradlew :mpp-core:cleanWasmJsBrowserTest :mpp-core:wasmJsBrowserTest | |
| # Build JS package for CLI usage | |
| - name: Build mpp-core JS package | |
| run: ./gradlew :mpp-core:assembleJsPackage | |
| # Upload build artifacts for debugging | |
| - name: Upload mpp-core build artifacts | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mpp-core-build-logs | |
| path: | | |
| mpp-core/build/reports/ | |
| mpp-core/build/test-results/ | |
| # Build and test mpp-ui (depends on mpp-core) | |
| test-mpp-ui: | |
| name: Test mpp-ui (KMP) | |
| runs-on: macos-latest | |
| needs: test-mpp-core # Ensure mpp-core builds successfully first | |
| steps: | |
| # Check out the current repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| # Check out the current repository | |
| - name: Install linters | |
| run: | | |
| brew install pipx | |
| brew install detekt pmd golangci-lint dotenv-linter hadolint actionlint gitleaks swiftlint | |
| pipx install sqlfluff checkov yamllint pylint semgrep | |
| npm install -g markdownlint-cli eslint htmlhint | |
| # Validate wrapper | |
| - name: Gradle Wrapper Validation | |
| uses: gradle/actions/wrapper-validation@v4 | |
| # Set up Java environment | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| # Set up Android SDK (pre-installed on ubuntu-latest) | |
| - name: Set up Android SDK | |
| run: | | |
| # Use ANDROID_HOME which is reliably set in GitHub Actions | |
| export ANDROID_SDK_ROOT="${ANDROID_HOME:-/usr/local/lib/android/sdk}" | |
| echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" >> $GITHUB_ENV | |
| echo "Android SDK location: $ANDROID_SDK_ROOT" | |
| ls -la $ANDROID_SDK_ROOT || echo "SDK directory not found at $ANDROID_SDK_ROOT" | |
| # Create local.properties with Android SDK location | |
| - name: Create local.properties | |
| run: | | |
| echo "sdk.dir=$ANDROID_SDK_ROOT" > local.properties | |
| cat local.properties | |
| echo "Verifying SDK directory exists..." | |
| test -d "$ANDROID_SDK_ROOT" && echo "✓ SDK directory exists" || echo "✗ SDK directory not found" | |
| # Accept Android SDK licenses | |
| - name: Accept Android SDK licenses | |
| run: | | |
| yes | $ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager --licenses || true | |
| # Setup Gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| # Grant execute permission for gradlew | |
| - name: Grant execute permission for gradlew | |
| run: chmod +x gradlew | |
| # Build JS package for CLI usage | |
| - name: Build mpp-core JS package | |
| run: ./gradlew :mpp-core:assembleJsPackage | |
| # Install pnpm for JS dependencies | |
| - name: Install pnpm | |
| run: npm install -g [email protected] | |
| # Install mpp-ui JS dependencies | |
| - name: Install mpp-ui dependencies | |
| run: pnpm install | |
| working-directory: mpp-ui | |
| # Fix yarn lock issues (if any) | |
| - name: Fix yarn lock issues | |
| run: ./gradlew kotlinUpgradeYarnLock || echo "Yarn lock upgrade failed, continuing..." | |
| # Test mpp-ui for all targets (excluding wasmJs browser tests due to Webpack compatibility issues) | |
| - name: Test mpp-ui | |
| run: ./gradlew :mpp-ui:allTests -x compileTestDevelopmentExecutableKotlinJs -x wasmJsBrowserTest -x wasmJsTest | |
| # Build Android Debug APK | |
| - name: Build Android Debug APK | |
| run: ./gradlew :mpp-ui:assembleDebug | |
| # Build Desktop distribution (JVM) | |
| - name: Build Desktop package | |
| run: ./gradlew :mpp-ui:packageDistributionForCurrentOS | |
| # Upload successful build outputs | |
| - name: Upload mpp-ui outputs | |
| if: success() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mpp-ui-outputs | |
| path: | | |
| mpp-ui/build/outputs/apk/debug/*.apk | |
| mpp-ui/build/compose/binaries/main/app/ | |
| # Summary job to report overall status | |
| kmp-test-summary: | |
| name: KMP Test Summary | |
| runs-on: ubuntu-latest | |
| needs: [test-mpp-core, test-mpp-ui] | |
| if: always() | |
| steps: | |
| - name: Check test results | |
| run: | | |
| if [[ "${{ needs.test-mpp-core.result }}" == "success" ]] && [[ "${{ needs.test-mpp-ui.result }}" == "success" ]]; then | |
| echo "✅ All KMP tests passed!" | |
| exit 0 | |
| else | |
| echo "❌ Some KMP tests failed:" | |
| echo " - mpp-core: ${{ needs.test-mpp-core.result }}" | |
| echo " - mpp-ui: ${{ needs.test-mpp-ui.result }}" | |
| exit 1 | |
| fi |