* test: list the slowest tests on request and stop waiting 30 s on a held WAL (#487) PM_TEST_SLOWEST=N makes tests/run_suite.py list the N slowest tests. Three history tests restored while their own read held a snapshot, so each publish sat out the 30 s WAL-truncate wait; they now use a short wait. Temporary diagnostics for the Windows timings ride along in this commit. * test(lora): check Windows folder rules without asking the network (#487) On Windows ntpath.realpath looks up \\server\share and waited about 2.8 s per test for a host that does not exist. The guard tests now use the lexical NT path rules, which is what they already ran on Linux and macOS. * ci(portability): keep Windows test files on the work disk (#487) The Windows runner's TEMP is on C:, where a flush took about 6 ms and a test database's create-to-delete about 111 ms; on D: the same took 0.5 ms and 23 ms. The job now points TEMP/TMP at RUNNER_TEMP and lists the 40 slowest tests. The fake HTTPS handlers get a TLS context that reads no certificate store, and the missing-share tests name localhost instead of an unknown server. The temporary diagnostics are removed. * ci(portability): spell the Windows test TEMP by its short name (#487) The runner's own TEMP was C:\Users\RUNNER~1\..., so tests met 8.3 short names in every temp path. The folder on D: keeps that when the disk has short names, and the step logs which spelling it got. TESTING.md notes that the slowest list is not printed when a job is cancelled. * ci(portability): switch on 8.3 names for the Windows test TEMP (#487) D: made no short names (run 40922502209 logged the long spelling), so the step now switches them on for D: before it creates the folder, and warns when the folder still has no short name.
78 lines
3.0 KiB
YAML
78 lines
3.0 KiB
YAML
name: Windows and macOS
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
# Non-blocking portability runs (#420): never on pull requests or in the merge queue, and no context
|
|
# here is a required check. A red run is fixed at its cause before the workspace cutover (#334).
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "17 3 * * *"
|
|
workflow_dispatch:
|
|
|
|
# Every run gets its own group (run_id), so no main commit's run is ever cancelled or dropped as pending.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.run_id }}
|
|
cancel-in-progress: false
|
|
|
|
env:
|
|
PYTHONFAULTHANDLER: "1"
|
|
|
|
# Time limit rule as in test.yml: ceil(1.5 x the slowest of three recent green runs on main) + 3
|
|
# minutes, never under 5. Measured 2026-10-26 in test.yml on runs 40257217681 (3be0ada),
|
|
# 40240706568 (fb9134f), 40228167328 (f9835aa), before these legs moved here in #420:
|
|
# slowest py3.10 on windows-latest: 12m43s / 15m54s / 14m53s -> 27 min
|
|
# (macos 6m14s-8m30s, windows 11m42s-15m54s)
|
|
jobs:
|
|
test:
|
|
name: py${{ matrix.python-version }} on ${{ matrix.os }}
|
|
runs-on: ${{ matrix.os }}
|
|
timeout-minutes: 27
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [windows-latest, macos-latest]
|
|
python-version: ["3.12", "3.13", "3.14"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v7
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
cache-dependency-path: requirements-dev.txt
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements-dev.txt
|
|
|
|
# The runner's TEMP is on C:, the OS disk, where a flush took about 6 ms
|
|
# and a test database's create-to-delete about 111 ms; on the D: work
|
|
# disk the same took 0.5 ms and 23 ms (macOS: 19 ms). Tests write their
|
|
# databases under TEMP, so it moves to a folder on D: (measured in #487,
|
|
# run 40915866444). The runner's TEMP was an 8.3 short name
|
|
# (C:\Users\RUNNER~1\...), so the new one is spelled by its short name too
|
|
# and paths still have to be resolved. D: makes no short names by default
|
|
# (run 40922502209), so they are switched on for it first.
|
|
- name: Keep test files on the work disk (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: pwsh
|
|
run: |
|
|
fsutil 8dot3name set D: 0
|
|
$folder = New-Item -ItemType Directory -Force -Path (Join-Path $env:RUNNER_TEMP "PromptManagerTests")
|
|
$short = (New-Object -ComObject Scripting.FileSystemObject).GetFolder($folder.FullName).ShortPath
|
|
Write-Output "test TEMP: $short (long name $($folder.FullName))"
|
|
if ($short -eq $folder.FullName) { Write-Output "::warning::D: gave the test TEMP no 8.3 short name" }
|
|
"TEMP=$short" >> $env:GITHUB_ENV
|
|
"TMP=$short" >> $env:GITHUB_ENV
|
|
|
|
- name: Run tests
|
|
env:
|
|
PM_TEST_SLOWEST: "40"
|
|
run: python -m tests.run_suite -v
|