Use GOOSE_DISABLE_KEYRING when running tests (#12783)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Douwe Osinga 2026-10-09 14:03:08 +00:00 • committed by GitHub
parent a54d979a48
commit 3a17633f35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 11 additions and 8 deletions

View file

@ -99,16 +99,16 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
sudo apt install -y libdbus-1-dev libxcb1-dev
- name: Build and Test
run: |
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
export CARGO_INCREMENTAL=0
cargo test --locked
working-directory: crates
env:
RUST_MIN_STACK: 8388608
GOOSE_DISABLE_KEYRING: 1
rust-build-lean:
name: Build Lean ACP Binary
@ -187,6 +187,7 @@ jobs:
cargo test -p goose-sdk --features uniffi --locked
env:
RUST_MIN_STACK: 8388608
GOOSE_DISABLE_KEYRING: 1
kotlin-gdk-smoke-test:
name: Test Kotlin GDK package
@ -219,7 +220,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
sudo apt install -y libdbus-1-dev libxcb1-dev
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
@ -228,13 +229,13 @@ jobs:
- name: Build and Test with ${{ matrix.tls-feature }}
run: |
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
export CARGO_INCREMENTAL=0
cargo test -p goose --no-default-features --features ${{ matrix.tls-feature }},code-mode,tree-sitter,live-voice,scheduler,platform-apps,chat-recall,acp-http
cargo test -p goose-providers --no-default-features --features ${{ matrix.tls-feature }},live-websocket
cargo test -p goose-cli --no-default-features --features ${{ matrix.tls-feature }},code-mode,tree-sitter,live-voice,scheduler,platform-apps,chat-recall,acp-http
env:
RUST_MIN_STACK: 8388608
GOOSE_DISABLE_KEYRING: 1
rust-build-and-test-roaming:
@ -251,7 +252,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt update -y
sudo apt install -y libdbus-1-dev gnome-keyring libxcb1-dev
sudo apt install -y libdbus-1-dev libxcb1-dev
- name: Cache Cargo artifacts
uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
@ -260,13 +261,13 @@ jobs:
- name: Build and Test with roaming
run: |
gnome-keyring-daemon --components=secrets --daemonize --unlock <<< 'foobar'
export CARGO_INCREMENTAL=0
cargo test -p goose-roaming
cargo build -p goose-cli --features roaming
cargo test -p goose-cli --features roaming --test roam_acp_client
env:
RUST_MIN_STACK: 8388608
GOOSE_DISABLE_KEYRING: 1
rust-build-windows:
name: Build Rust Project on Windows

View file

@ -53,6 +53,7 @@ just release-binary # release binary
### Test
```bash
export GOOSE_DISABLE_KEYRING=1 # avoid system keyring prompts
cargo test # all tests
cargo test -p goose # specific crate
cargo test --package goose --test mcp_integration_test
@ -91,7 +92,7 @@ Some workspace crates, including those that make up the GDK, are published to cr
### Run these only if the user has asked you to build/test your changes:
```
# 1. cargo build
# 2. cargo test -p <crate>
# 2. GOOSE_DISABLE_KEYRING=1 cargo test -p <crate>
# 3. cargo clippy --all-targets -- -D warnings
```

View file

@ -162,7 +162,8 @@ fn muse_cli_auth_path() -> PathBuf {
fn muse_cli_keychain_token() -> Option<MuseToken> {
#[cfg(feature = "system-keyring")]
{
if std::env::var("MUSE_AUTH_PATH").is_ok() {
if std::env::var("MUSE_AUTH_PATH").is_ok() || std::env::var("GOOSE_DISABLE_KEYRING").is_ok()
{
return None;
}