Skip to content

feat(debug-tool): expose dev URL pipe methods #361

feat(debug-tool): expose dev URL pipe methods

feat(debug-tool): expose dev URL pipe methods #361

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: '22.23.2'
PNPM_VERSION: '10.26.0'
jobs:
changes:
name: Detect changes
runs-on: ubuntu-latest
outputs:
force_all: ${{ github.event_name == 'workflow_dispatch' }}
run_all: ${{ steps.filter.outputs.shared == 'true' || steps.filter.outputs.tooling == 'true' || github.event_name == 'workflow_dispatch' }}
any_unit_tests: ${{ steps.filter.outputs.create_sparkling_app == 'true' || steps.filter.outputs.sparkling_app_cli == 'true' || steps.filter.outputs.sparkling_method_cli == 'true' || steps.filter.outputs.sparkling_method == 'true' || steps.filter.outputs.sparkling_router == 'true' || steps.filter.outputs.sparkling_navigation == 'true' || steps.filter.outputs.sparkling_storage == 'true' || steps.filter.outputs.sparkling_media == 'true' || steps.filter.outputs.playground == 'true' || steps.filter.outputs.app_template == 'true' || steps.filter.outputs.shared == 'true' || steps.filter.outputs.tooling == 'true' || github.event_name == 'workflow_dispatch' }}
build_playground: ${{ steps.filter.outputs.playground == 'true' || steps.filter.outputs.sparkling_sdk == 'true' || steps.filter.outputs.sparkling_method == 'true' || steps.filter.outputs.sparkling_debug_tool == 'true' || steps.filter.outputs.sparkling_navigation == 'true' || steps.filter.outputs.sparkling_media == 'true' || steps.filter.outputs.sparkling_storage == 'true' || steps.filter.outputs.shared == 'true' || steps.filter.outputs.tooling == 'true' || github.event_name == 'workflow_dispatch' }}
ios_swift: ${{ steps.filter.outputs.ios_swift }}
clang: ${{ steps.filter.outputs.clang }}
android_kotlin: ${{ steps.filter.outputs.android_kotlin }}
create_sparkling_app: ${{ steps.filter.outputs.create_sparkling_app }}
sparkling_app_cli: ${{ steps.filter.outputs.sparkling_app_cli }}
sparkling_method_cli: ${{ steps.filter.outputs.sparkling_method_cli }}
sparkling_method: ${{ steps.filter.outputs.sparkling_method }}
sparkling_router: ${{ steps.filter.outputs.sparkling_router }}
sparkling_navigation: ${{ steps.filter.outputs.sparkling_navigation }}
sparkling_storage: ${{ steps.filter.outputs.sparkling_storage }}
sparkling_media: ${{ steps.filter.outputs.sparkling_media }}
sparkling_sdk: ${{ steps.filter.outputs.sparkling_sdk }}
sparkling_debug_tool: ${{ steps.filter.outputs.sparkling_debug_tool }}
playground: ${{ steps.filter.outputs.playground }}
app_template: ${{ steps.filter.outputs.app_template }}
shared: ${{ steps.filter.outputs.shared }}
tooling: ${{ steps.filter.outputs.tooling }}
changed_filters: ${{ steps.filter.outputs.changes }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Paths filter
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
create_sparkling_app:
- 'packages/create-sparkling-app/**'
sparkling_app_cli:
- 'packages/sparkling-app-cli/**'
sparkling_method_cli:
- 'packages/sparkling-method-cli/**'
sparkling_method:
- 'packages/sparkling-method/**'
sparkling_router:
- 'packages/methods/sparkling-router/**'
sparkling_storage:
- 'packages/methods/sparkling-storage/**'
sparkling_sdk:
- 'packages/sparkling-sdk/**'
sparkling_debug_tool:
- 'packages/sparkling-debug-tool/**'
sparkling_navigation:
- 'packages/methods/sparkling-navigation/**'
sparkling_media:
- 'packages/methods/sparkling-media/**'
playground:
- 'packages/playground/**'
app_template:
- 'template/sparkling-app-template/**'
shared:
- 'packages/common/**'
tooling:
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- 'tsconfig.json'
- 'eslint.config.js'
- '.npmrc'
- '.prettierrc'
- 'Gemfile'
- 'scripts/**'
- 'packages/methods/ios-unit-tests/**'
- '.github/workflows/**'
ios_swift:
- 'packages/**/*.swift'
- 'template/**/*.swift'
- '.swift-format'
clang:
- 'packages/**/*.m'
- 'packages/**/*.mm'
- 'packages/**/*.cpp'
- 'template/**/*.m'
- 'template/**/*.mm'
- 'template/**/*.cpp'
- '.clang-format'
android_kotlin:
- 'packages/**/*.kt'
- 'packages/**/*.kts'
- 'template/**/*.kt'
- 'template/**/*.kts'
- '.editorconfig'
unit-tests:
name: TypeScript unit tests
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.any_unit_tests == 'true'
steps:
- name: Trigger log
run: |
echo "event_name=${{ github.event_name }}"
echo "ref=${{ github.ref }}"
echo "base_ref=${{ github.base_ref }}"
echo "head_ref=${{ github.head_ref }}"
echo "sha=${{ github.sha }}"
echo ""
echo "changed_filters=${{ needs.changes.outputs.changed_filters }}"
echo "run_all=${{ needs.changes.outputs.run_all }}"
echo "any_unit_tests=${{ needs.changes.outputs.any_unit_tests }}"
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run TypeScript unit-test coverage
run: pnpm coverage:ts
- name: Upload TypeScript coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: ts-coverage
path: coverage-reports/ts/
if-no-files-found: ignore
android-unit-tests:
name: Android unit tests
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.sparkling_method == 'true' || needs.changes.outputs.sparkling_navigation == 'true' || needs.changes.outputs.sparkling_storage == 'true' || needs.changes.outputs.sparkling_media == 'true' || needs.changes.outputs.sparkling_sdk == 'true' || needs.changes.outputs.sparkling_debug_tool == 'true' || needs.changes.outputs.playground == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Run JaCoCo unit-test coverage
run: bash scripts/coverage-android.sh
- name: Upload Android coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: android-coverage
path: coverage-reports/android/
if-no-files-found: ignore
ios-unit-tests:
name: iOS unit tests
runs-on: macos-latest
timeout-minutes: 90
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.sparkling_method == 'true' || needs.changes.outputs.sparkling_navigation == 'true' || needs.changes.outputs.sparkling_storage == 'true' || needs.changes.outputs.sparkling_media == 'true' || needs.changes.outputs.sparkling_sdk == 'true' || needs.changes.outputs.sparkling_debug_tool == 'true' || needs.changes.outputs.playground == 'true' || needs.changes.outputs.app_template == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.6'
bundler-cache: true
- name: Show Xcode and simulator state
run: |
xcodebuild -version
xcrun simctl list devices available
- name: Run iOS app-host unit-test coverage
timeout-minutes: 45
run: |
IOS_COVERAGE_APP_HOSTS=playground \
XCODEBUILD_TIMEOUT_SECONDS=1800 \
BUNDLE_GEMFILE="$GITHUB_WORKSPACE/Gemfile" \
bash scripts/coverage-ios.sh
- name: Run iOS independent method unit-test coverage
timeout-minutes: 30
run: BUNDLE_GEMFILE="$GITHUB_WORKSPACE/Gemfile" bash scripts/coverage-ios-methods.sh
- name: Upload iOS coverage reports
if: always()
uses: actions/upload-artifact@v4
with:
name: ios-coverage
path: |
coverage-reports/ios/
coverage-reports/ios-methods/
if-no-files-found: ignore
# ──────────────────────────────────────────────────────────────
# Playground build checks — block PR if any platform fails
# ──────────────────────────────────────────────────────────────
build-playground-android:
name: Build Playground (Android)
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.build_playground == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Setup JDK
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'temurin'
- name: Add Android platform-tools to PATH
run: echo "$ANDROID_HOME/platform-tools" >> $GITHUB_PATH
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build workspace dependencies
working-directory: packages/playground
run: pnpm build
- name: Build playground Android
working-directory: packages/playground
run: pnpm run:android
build-playground-ios:
name: Build Playground (iOS)
runs-on: macos-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.build_playground == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
- name: Install CocoaPods
run: bundle install
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build workspace dependencies
working-directory: packages/playground
run: pnpm build
- name: Build playground iOS
working-directory: packages/playground
run: pnpm run:ios
lint-android-kotlin:
name: Lint Android Kotlin
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.android_kotlin == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ktlint
run: |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.8.0/ktlint
chmod a+x ktlint
sudo mv ktlint /usr/local/bin/ktlint
- name: Lint Kotlin files
run: scripts/lint.sh kotlin
lint-ios-clang:
name: Lint iOS ObjC/C++
runs-on: ubuntu-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.clang == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install clang-format
run: sudo apt-get install -y clang-format
- name: Lint ObjC/C++ files
run: scripts/lint.sh clang
lint-ios-swift:
name: Lint iOS Swift
runs-on: macos-latest
needs: changes
if: needs.changes.outputs.run_all == 'true' || needs.changes.outputs.ios_swift == 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install swift-format
run: brew install swift-format
- name: Lint Swift files
run: scripts/lint.sh swift