---
name: Cross-Platform Testing
"on":
pull_request:
push:
workflow_dispatch:
permissions:
contents: read
jobs:
test-matrix:
name: Test on ${{ matrix.os }} (Python ${{ matrix.python-version }})
runs-on: ${{ matrix.os }}
permissions:
id-token: write # for step-security/harden-runner to fetch OIDC token
strategy:
fail-fast: false # Continue testing other platforms even if one fails
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.13", "3.14"]
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@df199fb7be9f65074067a9eb93f12bb4c5547cf2 # v2.13.3
with:
egress-policy: audit
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Prepare Python environment
uses: ./.github/actions/uv-env
with:
python-version: ${{ matrix.python-version }}
cache-key-prefix: matrix
- name: Run tests (full if API key present, else offline)
if: runner.os != 'Windows'
shell: bash
env:
BITSIGHT_API_KEY: ${{ secrets.BITSIGHT_API_KEY }}
run: |
if [ -n "${BITSIGHT_API_KEY}" ]; then
uv run pytest --verbose
else
uv run pytest --offline --verbose
fi
- name: Run tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
env:
BITSIGHT_API_KEY: ${{ secrets.BITSIGHT_API_KEY }}
run: |
if ($Env:BITSIGHT_API_KEY) {
uv run pytest --verbose
}
else {
uv run pytest --offline --verbose
}
- name: Test config file discovery (Unix-style paths)
if: runner.os != 'Windows'
run: |
uv run python -c "
from birre.config import load_settings
from pathlib import Path
config_path = Path.cwd() / 'config.toml'
print(f'Config path: {config_path}')
config = load_settings()
print('Config loaded successfully')
"
- name: Test config file discovery (Windows-style paths)
if: runner.os == 'Windows'
shell: pwsh
run: |
uv run python -c "
from birre.config import load_settings
from pathlib import Path
config_path = Path.cwd() / 'config.toml'
print(f'Config path: {config_path}')
config = load_settings()
print('Config loaded successfully')
"
- name: Test CLI entrypoint (Unix)
if: runner.os != 'Windows'
shell: bash
run: |
uv run birre --help
- name: Test CLI entrypoint (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
uv run birre --help