Skip to content
Merged
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: 14 additions & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
$schema: "https://docs.renovatebot.com/renovate-schema.json",
// Dependency Dashboard issue, monorepo grouping, changelog links. Catalog entries that share a
// version.ref (kotlin, circuit, apollo, compose, ...) already update together in one PR.
extends: ["config:recommended"],

packageRules: [
{
description: "kmp-dataresult is a -SNAPSHOT on GitHub Packages, which Renovate can't read without a token. Bump it by hand.",
matchPackageNames: ["io.github.solcott:dataresult*", "io.github.solcott:uistate*"],
enabled: false,
},
],
}
51 changes: 51 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

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

permissions:
contents: read
# io.github.solcott:dataresult* and uistate* resolve from GitHub Packages, which authenticates
# even public reads. settings.gradle.kts falls back to GITHUB_ACTOR/GITHUB_TOKEN.
packages: read

jobs:
build:
# Linux still compiles the iOS/macOS klibs; it only skips linking the frameworks and running
# the Apple test binaries. Switch to macos-latest, as kmp-dataresult does, for full Apple
# coverage. Chrome ships on the runner, so the js/wasmJs browser tests run here.
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v7

# Corretto 25 matches gradle/gradle-daemon-jvm.properties, so foojay has nothing to provision.
- name: Set up JDK 25
uses: actions/setup-java@v6
with:
distribution: 'corretto'
java-version: '25'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6

# The check half of ktfmtFormat: CI reports, it doesn't rewrite. The root wrapper does not
# cover build-logic, which is a separate included build.
- name: Check formatting
run: ./gradlew ktfmtCheck

# detekt and the dependency sorter are wired up on build-logic only, so lint it directly.
- name: Check build-logic
run: ./gradlew -p build-logic ktfmtCheck checkSortDependencies detekt

- name: Build
run: ./gradlew build
7 changes: 7 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,13 @@ Consequences worth knowing before you add the first test to a module:
only reaches one transitively. Without them the browser test bundle cannot load skiko, and the
task reports *"did not discover any tests"* rather than naming the cause. `:shared-compose` is a
module that needed all three the moment it gained a test.
- **A heavy browser test bundle blows karma's 30s `browserNoActivityTimeout` on CI**, and reports
the *same* *"did not discover any tests"* — the browser disconnects with "no message in 30000 ms"
before the first test reports, having spent the whole window just downloading skiko. It passes
locally, where Chrome is fast, and fails only on a CI runner. `:shared-compose:jsBrowserTest` is
the live case (it drags in `:ui`, so its bundle is ~15 MB); the timeout is raised in
`shared-compose/karma.config.d/`. `:presenter` and `:ui` load under the default today — add the
same snippet if they start disconnecting.
- **The first *native* test binary to link the whole graph needs `linkerOpts("-lsqlite3")`.** The
Apollo plugin adds it to `:network`'s own targets and the Apple app gets it from Xcode's
`OTHER_LDFLAGS`, but a Kotlin/Native klib records no linker options, so a downstream test
Expand Down
14 changes: 14 additions & 0 deletions shared-compose/karma.config.d/timeout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// ComposeGraphSaverTest builds the real graph, which reaches :ui and therefore drags skiko into
// the browser test bundle -- ~15 MB of skiko.wasm plus the Compose runtime. On a CI runner,
// headless Chrome needs well over karma's 30s browserNoActivityTimeout default just to download
// and start that bundle before the first test reports, so it disconnects with
// "no message in 30000 ms". The task then fails claiming it "did not discover any tests", which
// points nowhere near the real cause. Give the browser room.
//
// This is the heaviest browser test bundle in the build; :presenter and :ui load under the default
// and so carry no such file. Add the same snippet to them if they start disconnecting on CI.
config.set({
browserNoActivityTimeout: 300000,
browserDisconnectTimeout: 60000,
pingTimeout: 60000,
});