Skip to content

Exercise transcript search on Linux and macOS #1327

Exercise transcript search on Linux and macOS

Exercise transcript search on Linux and macOS #1327

Workflow file for this run

name: Windows CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
portable-core:
name: Portable core (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up Node.js for A9 benchmark checks
uses: actions/setup-node@v7
with:
node-version: 22
- name: Validate A9 retrieval benchmark
run: node bench/a9-retrieval.cjs --selftest
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore portable tests
run: dotnet restore Codev.Tests/Codev.Tests.csproj
- name: Restore headless CLI
run: dotnet restore Codev.Cli/Codev.Cli.csproj
- name: Build portable core
run: dotnet build Codev.Core/Codev.Core.csproj --configuration Release --no-restore
- name: Build headless CLI
run: dotnet build Codev.Cli/Codev.Cli.csproj --configuration Release --no-restore
- name: Run portable tests
if: runner.os != 'macOS'
run: dotnet test Codev.Tests/Codev.Tests.csproj --configuration Release --no-restore --logger "console;verbosity=minimal"
- name: Run portable tests with hang diagnostics on macOS
if: runner.os == 'macOS'
run: dotnet test Codev.Tests/Codev.Tests.csproj --configuration Release --no-restore --blame-hang-timeout 5m --blame-hang-dump-type none --logger "console;verbosity=normal"
- name: Run native Linux MCP OAuth Secret Service smoke
if: runner.os == 'Linux'
run: |
set -euo pipefail
# Newer hosted Ubuntu images resolve this file-backed mirror indirection
# from apt-mirrors.txt; older images list the Azure URI directly.
if [ -f /etc/apt/apt-mirrors.txt ]; then
sudo sed -i 's#http://azure.archive.ubuntu.com/ubuntu/#https://archive.ubuntu.com/ubuntu/#g' /etc/apt/apt-mirrors.txt
fi
sudo sed -i \
-e 's#mirror+file:/etc/apt/apt-mirrors.txt#https://archive.ubuntu.com/ubuntu/#g' \
-e 's#http://azure.archive.ubuntu.com/ubuntu/#https://archive.ubuntu.com/ubuntu/#g' \
-e 's/^Components:.*/Components: main universe/' \
/etc/apt/sources.list.d/ubuntu.sources
packages=()
command -v dbus-run-session >/dev/null || packages+=(dbus-daemon)
command -v gnome-keyring-daemon >/dev/null || packages+=(gnome-keyring)
command -v xvfb-run >/dev/null || packages+=(xvfb xauth)
if ((${#packages[@]})); then
timeout --signal=TERM --kill-after=5s 180s sudo apt-get \
-o Acquire::Retries=2 \
-o Acquire::Languages=none \
-o Acquire::http::Timeout=15 \
-o Acquire::https::Timeout=15 \
update
timeout --signal=TERM --kill-after=5s 180s sudo apt-get \
-o Acquire::Retries=2 \
-o Acquire::http::Timeout=15 \
-o Acquire::https::Timeout=15 \
install --yes --no-install-recommends "${packages[@]}"
fi
keyring_home="$(mktemp -d)"
runtime_dir="$(mktemp -d)"
chmod 700 "$keyring_home" "$runtime_dir"
HOME="$keyring_home" XDG_RUNTIME_DIR="$runtime_dir" dbus-run-session -- bash -euo pipefail -c '
od -An -N32 -tx1 /dev/urandom | tr -d "[:space:]" | gnome-keyring-daemon --daemonize --unlock --components=secrets >/dev/null
CODEV_TEST_NATIVE_MCP_OAUTH_VAULT=1 xvfb-run -a dotnet test Codev.Tests/Codev.Tests.csproj --configuration Release --no-build --no-restore --filter "FullyQualifiedName~OAuth_http_mcp_server_rejects_issuer_or_state_mismatch_and_matching_login_persists_refresh_tokens" --logger "console;verbosity=minimal"
'
- name: Run native macOS MCP OAuth Keychain smoke
if: runner.os == 'macOS'
env:
CODEV_TEST_NATIVE_MCP_OAUTH_VAULT: '1'
run: dotnet test Codev.Tests/Codev.Tests.csproj --configuration Release --no-build --no-restore --filter "FullyQualifiedName~OAuth_http_mcp_server_rejects_issuer_or_state_mismatch_and_matching_login_persists_refresh_tokens" --logger "console;verbosity=minimal"
avalonia-headless-ui:
name: Avalonia headless UI (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Build Avalonia UI
run: dotnet build Codev.Avalonia/Codev.Avalonia.csproj --configuration Release
- name: Run Avalonia headless UI tests
run: dotnet test Codev.Avalonia.Tests/Codev.Avalonia.Tests.csproj --configuration Release --logger "console;verbosity=minimal"
- name: Install Xvfb
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends xvfb
- name: Launch Avalonia under a virtual Linux display
if: runner.os == 'Linux'
run: |
set +e
xvfb-run -a timeout --signal=TERM --kill-after=5s 15s ./Codev.Avalonia/bin/Release/net10.0/Codev.Avalonia
status=$?
if [ "$status" -eq 124 ]; then
exit 0
fi
exit "$status"
build-and-test:
runs-on: windows-latest
steps:
- name: Check out repository
uses: actions/checkout@v7
- name: Set up .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Restore Windows-specific test project
run: dotnet restore Codev.Windows.Tests\Codev.Windows.Tests.csproj
- name: Restore portable test project
run: dotnet restore Codev.Tests\Codev.Tests.csproj
- name: Audit NuGet dependencies
shell: pwsh
run: ./scripts/audit-nuget-vulnerabilities.ps1
- name: Test local packaged-smoke launch guards
shell: pwsh
run: ./scripts/test-packaged-smoke-local-guard.ps1
- name: Run portable tests
run: dotnet test Codev.Tests\Codev.Tests.csproj --configuration Release --no-restore --logger "trx;LogFileName=codev-portable-tests.trx"
- name: Run native Windows MCP OAuth credential-vault smoke
env:
CODEV_TEST_NATIVE_MCP_OAUTH_VAULT: '1'
run: dotnet test Codev.Tests\Codev.Tests.csproj --configuration Release --no-build --no-restore --filter "FullyQualifiedName~OAuth_http_mcp_server_rejects_issuer_or_state_mismatch_and_matching_login_persists_refresh_tokens" --logger "console;verbosity=minimal"
- name: Run Windows UI tests
run: dotnet test Codev.Windows.Tests\Codev.Windows.Tests.csproj --configuration Release --no-restore --logger "trx;LogFileName=codev-windows-tests.trx"
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: codev-test-results
path: |
Codev.Tests/TestResults/*.trx
Codev.Windows.Tests/TestResults/*.trx
if-no-files-found: ignore