Skip to content
Open
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
25 changes: 25 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Nextest configuration for PromptForge workspace.

[profile.default]
# Report slow tests after 60s and terminate if hung.
slow-timeout = { period = "60s", terminate-after = 3 }
# Cleanly terminate lingering background tasks/threads after test returns.
leak-timeout = "250ms"

[profile.ci]
# CI profile settings: immediate failure reporting and timeout controls.
slow-timeout = { period = "60s", terminate-after = 3 }
leak-timeout = "250ms"
failure-output = "immediate-final"

[test-groups]
# Limit concurrency for tensor/FFI-heavy suites to prevent core thrashing.
heavy = { max-threads = 2 }

[[profile.default.overrides]]
filter = 'package(promptforge-tool-picker) | package(gateway-stt-backend-whisper) | package(gateway-stt)'
test-group = 'heavy'

[[profile.ci.overrides]]
filter = 'package(promptforge-tool-picker) | package(gateway-stt-backend-whisper) | package(gateway-stt)'
test-group = 'heavy'
157 changes: 110 additions & 47 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,31 @@ concurrency:
# to anonymous, which is what the cache is there to make rare.
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
RUSTUP_TOOLCHAIN: stable

jobs:
check:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt

- name: Format
run: cargo fmt --all --check

clippy:
runs-on: ubuntu-latest
# RUSTUP_TOOLCHAIN outranks the repo's rust-toolchain.toml (pinned to the
# MSRV for local builds); this job means to test stable.
env:
RUSTUP_TOOLCHAIN: stable
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- uses: dtolnay/rust-toolchain@1.89.0
components: clippy

- name: Cache cargo
uses: Swatinem/rust-cache@v2
Expand All @@ -42,10 +51,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install config UI dependencies
working-directory: crates/gateway-config-ui/ui
run: npm ci
- name: Install UI dependencies
run: |
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Build Gateway without Workshop UI tooling
run: cargo build --locked -p gateway
Expand All @@ -66,26 +78,44 @@ jobs:
- name: Check product dependency boundaries
run: cargo test -p gateway-stt --test it architecture

- name: Format
run: cargo fmt --all --check

# The desktop packages stay in their platform jobs because Linux needs
# Tauri system libraries. All gateway and STT features are pure Rust
# now that whisper.cpp is loaded from a managed runtime artifact.
- name: Clippy
run: cargo clippy --workspace --exclude workshop --exclude workshop-server --all-targets --all-features -- -D warnings

- name: Test
run: cargo test --locked --workspace --exclude workshop --exclude workshop-server --all-features
test:
runs-on: ubuntu-latest
env:
RUSTUP_TOOLCHAIN: stable
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Cache the embedding model
uses: ./.github/actions/hf-model-cache

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
run: |
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Test (concurrent via nextest)
run: cargo nextest run --locked --workspace --exclude workshop --exclude workshop-server --all-features

- name: Doctests
run: cargo test --workspace --exclude workshop --exclude workshop-server --all-features --doc

- name: Docs
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --workspace --no-deps --all-features --exclude workshop --exclude workshop-server

- name: Check headless gateway
run: cargo check -p gateway --no-default-features

Expand All @@ -100,6 +130,36 @@ jobs:
exit 1
fi

docs:
runs-on: ubuntu-latest
env:
RUSTUP_TOOLCHAIN: stable
RUSTDOCFLAGS: -D warnings
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: Swatinem/rust-cache@v2

- name: Cache the embedding model
uses: ./.github/actions/hf-model-cache

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
run: |
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Docs
run: cargo doc --workspace --no-deps --all-features --exclude workshop --exclude workshop-server

check-workshop:
runs-on: windows-latest
env:
Expand All @@ -111,6 +171,9 @@ jobs:
with:
components: clippy

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Cache cargo
uses: Swatinem/rust-cache@v2

Expand All @@ -120,10 +183,13 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
working-directory: crates/workshop-server/ui
run: npm ci
run: |
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Build featureless Gateway
run: cargo build --locked -p gateway --no-default-features
Expand All @@ -134,8 +200,8 @@ jobs:
- name: Clippy (workshop)
run: cargo clippy -p workshop -p workshop-server --all-targets -- -D warnings

- name: Test (workshop)
run: cargo test --locked -p workshop -p workshop-server
- name: Test (workshop, concurrent via nextest)
run: cargo nextest run --locked -p workshop -p workshop-server

- name: Test Gateway process ownership races
run: |
Expand Down Expand Up @@ -181,15 +247,18 @@ jobs:
- name: Install Tauri system packages
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libssl-dev librsvg2-dev
sudo apt-get install -y --no-install-recommends libwebkit2gtk-4.1-dev libssl-dev librsvg2-dev

- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
working-directory: crates/workshop-server/ui
run: npm ci
run: |
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Build featureless Gateway
run: cargo build --locked -p gateway --no-default-features
Expand Down Expand Up @@ -232,6 +301,8 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
working-directory: crates/workshop-server/ui
Expand Down Expand Up @@ -273,8 +344,6 @@ jobs:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@1.89.0
with:
components: rustfmt

- name: Cache cargo
uses: Swatinem/rust-cache@v2
Expand All @@ -285,31 +354,25 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: crates/*/ui/package-lock.json

- name: Install UI dependencies
working-directory: crates/workshop-server/ui
run: npm ci

- name: Install config UI dependencies
working-directory: crates/gateway-config-ui/ui
run: npm ci

- name: Build and test on MSRV
run: |
cargo build --locked --workspace --exclude workshop --exclude workshop-server --all-features
cargo test --locked --workspace --exclude workshop --exclude workshop-server --all-features
npm ci --prefix crates/workshop-server/ui
npm ci --prefix crates/gateway-config-ui/ui

- name: Check on MSRV
run: cargo check --locked --workspace --exclude workshop --exclude workshop-server --all-targets --all-features

supply-chain:
runs-on: ubuntu-latest
env:
RUSTUP_TOOLCHAIN: stable
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable

- name: Install cargo-deny and cargo-audit
run: cargo install cargo-deny cargo-audit --locked
- uses: taiki-e/install-action@v2
with:
tool: cargo-deny, cargo-audit

- name: cargo deny
run: cargo deny check
Expand Down
2 changes: 2 additions & 0 deletions crates/gateway/tests/it/realtime_stt/protocol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ async fn mounted_route_drives_scripted_wire_ownership_errors_and_privacy() {
.await
.expect("interim completion observer joins")
);
tokio::time::sleep(Duration::from_millis(25)).await;
}
send(
&mut socket,
Expand Down Expand Up @@ -332,6 +333,7 @@ async fn standard_interims_emit_only_appendable_agreed_deltas() {
.await
.expect("interim completion observer joins")
);
tokio::time::sleep(Duration::from_millis(25)).await;
}
send(
&mut socket,
Expand Down
1 change: 1 addition & 0 deletions crates/promptforge-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] }
[dev-dependencies]
axum.workspace = true
promptforge-parser = { workspace = true, features = ["test-support"] }
promptforge-tool-picker = { workspace = true, features = ["test-fixtures"] }
tokio.workspace = true

[lints]
Expand Down
Loading
Loading