Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,22 @@ updates:
labels:
- "dependencies"
groups:
runtime-dependencies:
patterns:
- "cryptography"
- "typing-extensions"
dev-dependencies:
patterns:
- "pytest*"
- "hypothesis"
- "ruff"
- "mypy"
- "tox"
docs-dependencies:
patterns:
- "mkdocs*"
- "pymdown-extensions"
- "pygments"

- package-ecosystem: "github-actions"
directory: "/"
Expand Down
56 changes: 56 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Benchmark Baseline

on:
workflow_dispatch:
inputs:
iterations:
description: "Iterations per operation."
required: true
default: "3"
file_size:
description: "SFTP benchmark file size in bytes."
required: true
default: "1048576"
schedule:
- cron: "37 4 * * 3"
workflow_call:
inputs:
iterations:
required: false
type: string
default: "2"
file_size:
required: false
type: string
default: "262144"

permissions:
contents: read

concurrency:
group: benchmark-baseline-${{ github.ref }}
cancel-in-progress: true

jobs:
local-baseline:
name: Docker local benchmark baseline
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.11"
- run: uv pip install --system -e ".[test]"
- name: Run local baseline
run: |
python scripts/benchmark_local_baseline.py \
--iterations "${{ inputs.iterations || github.event.inputs.iterations || '3' }}" \
--file-size "${{ inputs.file_size || github.event.inputs.file_size || '1048576' }}" \
--output benchmark-results/local-baseline.json
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: spindlex-local-benchmark-${{ github.run_id }}
path: benchmark-results/local-baseline.json
if-no-files-found: error
180 changes: 116 additions & 64 deletions .github/workflows/ci-matrix.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,6 @@
name: Compatibility Matrix

on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "spindlex/**"
- "tests/**"
- "scripts/**"
- ".github/ISSUE_TEMPLATE/**"
- "pyproject.toml"
- ".github/workflows/ci-matrix.yml"
- ".github/workflows/integration.yml"
- ".github/workflows/release.yml"
push:
branches: [main]
paths:
- "spindlex/**"
- "tests/**"
- "scripts/**"
- "pyproject.toml"
- ".github/workflows/ci-matrix.yml"
- ".github/workflows/integration.yml"
- ".github/workflows/release.yml"
schedule:
- cron: "23 3 * * 1"
workflow_dispatch:
Expand All @@ -42,80 +20,154 @@ concurrency:
cancel-in-progress: true

jobs:
unit-matrix:
name: Ubuntu Python ${{ matrix.python-version }}
ubuntu-python:
name: Ubuntu Python compatibility
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
timeout-minutes: 45
permissions:
actions: read
contents: read
issues: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

- name: Python 3.9
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
- run: uv pip install --system -e ".[test]"
- name: Run unit compatibility suite
run: |
pytest tests/ \
-m "not integration and not real_server and not slow and not performance" \
--timeout=120 \
--timeout-method=thread \
--cov=spindlex \
--cov-report=xml
python-version: "3.9"
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

- name: Python 3.10
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.10"
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

- name: Python 3.11
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.11"
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread --cov=spindlex --cov-report=xml

- name: Upload unit coverage
if: matrix.python-version == '3.11' && github.event_name != 'workflow_call'
if: github.event_name != 'workflow_call'
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
files: ./coverage.xml
flags: unit
token: ${{ secrets.CODECOV_TOKEN }}

cross-platform-smoke:
name: ${{ matrix.os }} Python 3.11
runs-on: ${{ matrix.os }}
- name: Python 3.12
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.12"
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

- name: Python 3.13
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.13"
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

- name: Track repeated Ubuntu compatibility failures
if: >
failure() &&
github.event_name != 'pull_request' &&
(github.event_name != 'workflow_call' || inputs.track_failures)
env:
GITHUB_TOKEN: ${{ github.token }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
python scripts/track_workflow_failure.py ci \
--repository "${{ github.repository }}" \
--token "$GITHUB_TOKEN" \
--workflow-name "${{ github.workflow }}" \
--workflow-file "ci-matrix.yml" \
--run-id "${{ github.run_id }}" \
--run-url "$RUN_URL" \
--branch "${{ github.ref_name }}" \
--source-sha "${{ github.sha }}" \
--event-name "${{ github.event_name }}" \
--failed-stage "ubuntu-python"

windows-smoke:
name: Windows Python 3.11 smoke
needs: ubuntu-python
runs-on: windows-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
os: ["windows-latest", "macos-latest"]
permissions:
actions: read
contents: read
issues: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.11"
- run: uv pip install --system -e ".[test]"
- name: Run cross-platform unit smoke suite
run: |
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

failure-tracking:
name: Matrix failure tracking
needs:
- unit-matrix
- cross-platform-smoke
if: >
always() &&
github.event_name != 'pull_request' &&
(github.event_name != 'workflow_call' || inputs.track_failures) &&
(needs.unit-matrix.result == 'failure' || needs.cross-platform-smoke.result == 'failure')
runs-on: ubuntu-latest
- name: Track repeated Windows compatibility failures
if: >
failure() &&
github.event_name != 'pull_request' &&
(github.event_name != 'workflow_call' || inputs.track_failures)
env:
GITHUB_TOKEN: ${{ github.token }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
python scripts/track_workflow_failure.py ci \
--repository "${{ github.repository }}" \
--token "$GITHUB_TOKEN" \
--workflow-name "${{ github.workflow }}" \
--workflow-file "ci-matrix.yml" \
--run-id "${{ github.run_id }}" \
--run-url "$RUN_URL" \
--branch "${{ github.ref_name }}" \
--source-sha "${{ github.sha }}" \
--event-name "${{ github.event_name }}" \
--failed-stage "windows-smoke"

macos-smoke:
name: macOS Python 3.11 smoke
needs: windows-smoke
runs-on: macos-latest
timeout-minutes: 20
permissions:
actions: read
contents: read
issues: write
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- uses: astral-sh/setup-uv@caf0cab7a618c569241d31dcd442f54681755d39 # v3
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.11"
- name: Track repeated compatibility failures
- run: |
uv pip install --system -e ".[test]"
pytest tests/ -m "not integration and not real_server and not slow and not performance" --timeout=120 --timeout-method=thread

- name: Track repeated macOS compatibility failures
env:
GITHUB_TOKEN: ${{ github.token }}
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
if: >
failure() &&
github.event_name != 'pull_request' &&
(github.event_name != 'workflow_call' || inputs.track_failures)
run: |
python scripts/track_workflow_failure.py ci \
--repository "${{ github.repository }}" \
Expand All @@ -127,4 +179,4 @@ jobs:
--branch "${{ github.ref_name }}" \
--source-sha "${{ github.sha }}" \
--event-name "${{ github.event_name }}" \
--failed-stage "compatibility-matrix"
--failed-stage "macos-smoke"
Loading
Loading