Skip to content

chore(deps): Bump actions/setup-java from 5 to 6 #157

chore(deps): Bump actions/setup-java from 5 to 6

chore(deps): Bump actions/setup-java from 5 to 6 #157

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
# Minimal token scope — this CI only reads the repo and reports back.
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
dart-packages:
name: Dart package (${{ matrix.package }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- app_intents_annotations
- app_intents_codegen
steps:
- uses: actions/checkout@v7
- uses: dart-lang/setup-dart@v1
with:
# Pinned to keep analyze/test reproducible. Bump via Dependabot
# alongside the package's `environment.sdk` constraint.
sdk: '3.10.0'
- name: Install dependencies
working-directory: packages/${{ matrix.package }}
run: dart pub get
- name: Verify formatting
working-directory: packages/${{ matrix.package }}
run: dart format --output=none --set-exit-if-changed .
- name: Analyze
working-directory: packages/${{ matrix.package }}
run: dart analyze
- name: Run tests
working-directory: packages/${{ matrix.package }}
run: dart test
flutter-plugin:
name: Flutter plugin (app_intents)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.2'
channel: stable
cache: true
- name: Install dependencies
working-directory: packages/app_intents
run: flutter pub get
- name: Verify formatting
working-directory: packages/app_intents
run: dart format --output=none --set-exit-if-changed lib test
- name: Analyze
working-directory: packages/app_intents
run: flutter analyze
- name: Run tests
working-directory: packages/app_intents
run: flutter test
example-app:
name: Example app analyze
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.2'
channel: stable
cache: true
- name: Install dependencies
working-directory: app
run: flutter pub get
- name: Verify formatting
working-directory: app
run: dart format --output=none --set-exit-if-changed lib test
- name: Run codegen (Dart part files)
# Generated *.intent.dart files are not checked into the repo, so the
# analyzer needs them produced before it can resolve `part` directives.
working-directory: app
run: dart run build_runner build --delete-conflicting-outputs
- name: Analyze
working-directory: app
run: flutter analyze
android-plugin:
name: Android plugin build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.41.2'
channel: stable
cache: true
- name: Install Flutter dependencies
working-directory: app
run: flutter pub get
- name: Generate Kotlin sources
working-directory: app
run: |
dart run app_intents_codegen:generate_kotlin \
-i lib \
-o android/app/src/main/kotlin/com/example/app/generated \
-p com.example.app.generated
- name: Build debug APK
working-directory: app
run: flutter build apk --debug
swift-package:
name: Swift package (AppIntentsBridge)
runs-on: macos-15
steps:
- uses: actions/checkout@v7
- name: Show Swift / Xcode versions
run: |
swift --version
xcodebuild -version
- name: Select iOS Simulator
# Pick whatever the runner currently has so we don't have to chase
# Xcode-version-specific device names. We pick the first available
# iPhone — none of these tests depend on a specific device model.
id: select_simulator
run: |
DEVICE_NAME=$(xcrun simctl list devices available --json | python3 -c '
import json, sys
devices = json.load(sys.stdin)["devices"]
iphones = [d["name"] for runtime in devices.values() for d in runtime if d["name"].startswith("iPhone")]
print(iphones[0] if iphones else "")
')
if [ -z "$DEVICE_NAME" ]; then
echo "No iPhone simulator available on this runner" >&2
exit 1
fi
echo "device=$DEVICE_NAME" >> "$GITHUB_OUTPUT"
echo "Using simulator: $DEVICE_NAME"
- name: Run tests on iOS Simulator
# The package targets iOS only, so `swift test` cannot run on the
# macOS host. We boot an iOS Simulator and run the XCTest suite via
# xcodebuild, which exercises FlutterBridge against the real iOS
# concurrency runtime.
env:
SIMULATOR_NAME: ${{ steps.select_simulator.outputs.device }}
run: |
xcodebuild test \
-scheme AppIntentsBridge \
-destination "platform=iOS Simulator,name=$SIMULATOR_NAME,OS=latest" \
-derivedDataPath .build-ci