Skip to content

fix: scope Mac support to Apple Silicon and isolate Keychain tests #3

fix: scope Mac support to Apple Silicon and isolate Keychain tests

fix: scope Mac support to Apple Silicon and isolate Keychain tests #3

Workflow file for this run

name: Validate plugin
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
windows:
name: Windows distribution and connector
runs-on: windows-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Validate repository
run: python scripts/validate_repository.py
- name: Run isolated connector and bundle tests
shell: pwsh
run: |
$qdRuntime = & ./plugins/quantdinger/scripts/install-connector.ps1 -PrintRuntime
if ($LASTEXITCODE -and $LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
& "$qdRuntime/python/python.exe" -I -m unittest discover -s plugins/quantdinger/tests -p "test_*.py" -v
exit $LASTEXITCODE
macos:
name: macOS Apple Silicon
runs-on: macos-15
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v6
with:
version: '0.12.13'
cache-dependency-glob: 'plugins/quantdinger-macos/runtime/requirements-macos.lock'
- name: Bootstrap managed Python and locked dependencies
run: |
/bin/bash plugins/quantdinger-macos/scripts/launch-quantdinger.sh --print-python > "$RUNNER_TEMP/qd-python"
"$(cat "$RUNNER_TEMP/qd-python")" -I scripts/validate_repository.py
"$(cat "$RUNNER_TEMP/qd-python")" -I scripts/sync_macos_plugin.py --check
- name: Create disposable CI keychain
run: |
test_password="$(uuidgen)"
security create-keychain -p "$test_password" "$RUNNER_TEMP/qd-ci.keychain-db"
security default-keychain -d user -s "$RUNNER_TEMP/qd-ci.keychain-db"
security unlock-keychain -p "$test_password" "$RUNNER_TEMP/qd-ci.keychain-db"
security set-keychain-settings -lut 21600 "$RUNNER_TEMP/qd-ci.keychain-db"
- name: Run native Keychain test
timeout-minutes: 3
run: |
"$(cat "$RUNNER_TEMP/qd-python")" -I -m unittest discover -s plugins/quantdinger-macos/tests -p 'test_macos.py' -k native_keychain -v
- name: Run shared protocol and Mac bootstrap tests
timeout-minutes: 6
run: |
"$(cat "$RUNNER_TEMP/qd-python")" -I -m unittest discover -s plugins/quantdinger-macos/tests -p 'test_connector.py' -v
"$(cat "$RUNNER_TEMP/qd-python")" -I -m unittest discover -s plugins/quantdinger-macos/tests -p 'test_macos.py' -k application_support -v
"$(cat "$RUNNER_TEMP/qd-python")" -I -m unittest discover -s plugins/quantdinger-macos/tests -p 'test_macos.py' -k cold_launch -v