mirror of
https://github.com/schpet/linear-cli.git
synced 2026-09-14 14:26:50 +08:00
d1beb924e4
isKeyringAvailable() only probed on Linux and returned true unconditionally everywhere else, so on macOS the keyring round-trip always attempted a real write. Under ssh or an agent shell the login keychain has no UI session to unlock it, so 'security add-generic-password' fails with exit 36 (errSecInteractionNotAllowed) and 'deno task test' fails locally even though nothing is wrong with the code. Probe with 'security show-keychain-info', which is read-only and returns 36 in exactly that state. A read-only probe is not enough on its own: reads still succeed while locked (find-generic-password returns 44), so only a write-capable check detects it. The guard keys on 36 specifically rather than any nonzero exit, so a genuine keyring bug still fails the test loudly. CI is unaffected: its macOS keychain is unlocked, and the keyring job now sets LINEAR_KEYRING_INTEGRATION=1 to force the test to run, so a probe that ever wrongly reports 'unavailable' cannot quietly turn that job into a no-op.
65 lines
1.5 KiB
YAML
65 lines
1.5 KiB
YAML
name: CI
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
|
|
jobs:
|
|
check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: denoland/setup-deno@v2
|
|
with:
|
|
deno-version: "2.7.9"
|
|
|
|
- name: Generate GraphQL code
|
|
run: deno task codegen
|
|
|
|
- name: Check formatting
|
|
run: deno fmt --check
|
|
|
|
- name: Lint code
|
|
run: deno lint
|
|
|
|
- name: Type check
|
|
run: deno task check
|
|
|
|
- name: Run tests
|
|
run: deno task test --ignore=test/keyring.integration.test.ts
|
|
|
|
- name: Install linear-cli for skill generation
|
|
run: deno task install
|
|
|
|
- name: Verify skill docs generate successfully
|
|
run: deno task generate-skill-docs
|
|
|
|
keyring-integration:
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: macos-latest
|
|
- os: ubuntu-latest
|
|
- os: windows-latest
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: denoland/setup-deno@v2
|
|
with:
|
|
deno-version: "2.7.9"
|
|
|
|
- name: Set up Secret Service
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get update && sudo apt-get install -y gnome-keyring libsecret-tools dbus-x11
|
|
eval "$(dbus-launch --sh-syntax)"
|
|
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS" >> $GITHUB_ENV
|
|
echo "test-password" | gnome-keyring-daemon --unlock --components=secrets
|
|
|
|
- name: Keyring Integration
|
|
env:
|
|
LINEAR_KEYRING_INTEGRATION: "1"
|
|
run: deno task test test/keyring.integration.test.ts
|