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
95 changes: 19 additions & 76 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,47 @@
name: CI

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run tests
run: |
PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}/dummy_nodes" \
python -m pytest tests/unit/ tests/integration/ -v --tb=short

- run: pip install -e ".[dev]"
- run: python -m pytest tests/unit/ tests/integration/ -v --tb=short --timeout=120
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
pip install ruff isort

- name: Check formatting with ruff
run: ruff check .

- name: Check import sorting (excluding xpyd/)
run: isort --check-only --diff --skip xpyd .

- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -e ".[dev]" ruff isort
- run: ruff check .
- run: isort --check-only --diff --skip xpyd .
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Build wheel and sdist
run: |
python -m pip install --upgrade pip
pip install build
python -m build

- name: Install from wheel
run: pip install dist/*.whl

- name: CLI smoke test
run: |
xpyd --help
xpyd --version

- name: Run tests (installed mode)
run: |
pip install pytest pytest-asyncio aiohttp requests
PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}/dummy_nodes" \
python -m pytest tests/integration/test_cli_and_discovery.py -v --tb=short

- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install build && python -m build
- run: pip install dist/*.whl
- run: xpyd --help && xpyd --version
- run: pip install pytest pytest-asyncio aiohttp requests xpyd-sim && python -m pytest tests/integration/test_cli_and_discovery.py -v --tb=short
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run benchmark tests
run: |
PYTHONPATH="${PYTHONPATH}:${GITHUB_WORKSPACE}/dummy_nodes" \
python -m pytest tests/stress/ -v --tb=short -m benchmark -s
- uses: actions/setup-python@v5
with: {python-version: "3.12"}
- run: pip install -e ".[dev]"
- run: python -m pytest tests/stress/ -v --tb=short -m benchmark -s
1 change: 1 addition & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[settings]
profile = black
line_length = 88
known_first_party = xpyd,sim_adapter
Empty file removed dummy_nodes/__init__.py
Empty file.
237 changes: 0 additions & 237 deletions dummy_nodes/common.py

This file was deleted.

Loading
Loading