Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .github/cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"version": "0.2",
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"dictionaries": ["vgv_allowed", "vgv_forbidden"],
"dictionaries": [
"vgv_allowed",
"vgv_forbidden"
],
"dictionaryDefinitions": [
{
"name": "vgv_allowed",
Expand All @@ -16,6 +19,13 @@
],
"useGitignore": true,
"words": [
"fluttium"
"androidx",
"fluttium",
"inspectable",
"javascriptengine",
"jetpack",
"jscore",
"logcat",
"thenables"
]
}
48 changes: 13 additions & 35 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,21 @@
version: 2
enable-beta-ecosystems: true
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
- package-ecosystem: "pub"
directory: "/javascript"
directories:
- "/packages/javascript"
- "/packages/javascript/example"
- "/packages/javascript_platform_interface"
- "/packages/javascript_android"
- "/packages/javascript_darwin"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript/example"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_platform_interface"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_android"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_ios"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_linux"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_macos"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_web"
schedule:
interval: "daily"
- package-ecosystem: "pub"
directory: "/javascript_windows"
interval: "weekly"
- package-ecosystem: "gradle"
directories:
- "/packages/javascript_android/android"
- "/packages/javascript/example/android"
schedule:
interval: "daily"
interval: "weekly"
54 changes: 54 additions & 0 deletions .github/workflows/ci-diag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: ci-diag

on:
push:
branches:
- 'ci-diag/**'
workflow_dispatch:

jobs:
android:
strategy:
fail-fast: false
matrix:
include:
- api-level: "37.0"
target: google_apis
- api-level: "37.1"
target: google_apis_ps16k
- api-level: "37.2"
target: google_apis_ps16k
name: android-${{ matrix.api-level }}-${{ matrix.target }}
runs-on: ubuntu-latest
timeout-minutes: 40
defaults:
run:
working-directory: packages/javascript/example
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Integration tests (emulator)
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
working-directory: packages/javascript/example
script: |
adb shell dumpsys webviewupdate | grep -iE 'Current WebView package|versionName' | head -3
flutter test integration_test/android_transports_test.dart -d emulator-5554
140 changes: 139 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,148 @@
name: ci

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

on:
pull_request:
branches:
- main
push:
branches:
- main

jobs:
build:
semantic-pull-request:
if: github.event_name == 'pull_request'
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1

spell-check:
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
with:
includes: |
**/*.md
!**/third_party/**
modified_files_only: false

packages:
name: ${{ matrix.package }}
strategy:
fail-fast: false
matrix:
include:
- package: javascript
os: ubuntu-latest
- package: javascript_platform_interface
os: ubuntu-latest
- package: javascript_android
os: ubuntu-latest
# The darwin tests exercise the real JavaScriptCore runtime, which
# only exists on macOS hosts.
- package: javascript_darwin
os: macos-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 15
defaults:
run:
working-directory: packages/${{ matrix.package }}
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: dart format --output=none --set-exit-if-changed .
- run: flutter analyze
- run: flutter test

example-android:
runs-on: ubuntu-latest
timeout-minutes: 40
defaults:
run:
working-directory: packages/javascript/example
steps:
- uses: actions/checkout@v5
- uses: actions/setup-java@v5
with:
distribution: temurin
java-version: "17"
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get
- run: flutter analyze
- run: flutter test
- run: flutter build apk --debug

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Integration tests (emulator)
uses: reactivecircus/android-emulator-runner@v2
with:
# A recent image so the WebView is new enough for message ports and
# promise results; the transport test skips what the device lacks.
api-level: 36
target: google_apis
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
working-directory: packages/javascript/example
script: flutter test integration_test -d emulator-5554

example-ios:
runs-on: macos-latest
timeout-minutes: 30
defaults:
run:
working-directory: packages/javascript/example
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter pub get

- name: Start simulator
id: simulator
run: |
UDID=$(xcrun simctl list devices available -j | python3 -c 'import json,sys; d=json.load(sys.stdin)["devices"]; print(next(x["udid"] for k in sorted(d, reverse=True) for x in d[k] if x["name"].startswith("iPhone")))')
echo "udid=$UDID" >> "$GITHUB_OUTPUT"
xcrun simctl boot "$UDID"
xcrun simctl bootstatus "$UDID" -b
# A simulator booted only via simctl never surfaces the app's
# "Dart VM Service is listening" log line on the hosted macOS
# runners, so `flutter test -d` waits forever after the Xcode
# build. Opening Simulator.app on the booted device fixes it.
open -a Simulator --args -CurrentDeviceUDID "$UDID"
sleep 10

- name: Integration tests (simulator)
# android_transports_test.dart is Android-only; launching a second app
# in one run is also flaky on Apple targets, so run the contract file.
run: flutter test integration_test/javascript_test.dart -d ${{ steps.simulator.outputs.udid }}

example-macos:
runs-on: macos-latest
timeout-minutes: 20
defaults:
run:
working-directory: packages/javascript/example
steps:
- uses: actions/checkout@v5
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- run: flutter config --enable-macos-desktop
- run: flutter pub get
- name: Integration tests (macOS desktop)
run: flutter test integration_test/javascript_test.dart -d macos
Loading
Loading