webdrop-bridge/.github/workflows/tests.yml
claudi 61aa33633c Add initial project structure and documentation
- Created architecture documentation outlining high-level design, module organization, data flow, security model, performance considerations, testing strategy, and deployment architecture.
- Added pyproject.toml for project metadata and dependencies management.
- Introduced requirements files for development and production dependencies.
- Set up testing configuration with pytest and tox.
- Established basic directory structure for source code and tests, including __init__.py files.
- Implemented a sample web application (index.html) for drag-and-drop functionality.
- Configured VS Code workspace settings for Python development.
2026-01-28 10:48:36 +01:00

101 lines
2.5 KiB
YAML

name: Tests & Quality Checks
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.10", "3.11", "3.12"]
exclude:
# Reduce matrix to save CI time
- os: ubuntu-latest
python-version: "3.10"
- os: macos-latest
python-version: "3.10"
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with ruff
run: ruff check src tests
continue-on-error: true
- name: Format check with black
run: black --check src tests
continue-on-error: true
- name: Type check with mypy
run: mypy src/webdrop_bridge
continue-on-error: true
- name: Run pytest
run: pytest --cov=src/webdrop_bridge --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
build:
name: Build Artifacts
runs-on: ${{ matrix.os }}
needs: test
if: success()
strategy:
matrix:
include:
- os: windows-latest
artifact: webdrop-bridge-windows
- os: macos-latest
artifact: webdrop-bridge-macos
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Build Windows MSI
if: matrix.os == 'windows-latest'
run: python build/scripts/build_windows.py
continue-on-error: true
- name: Build macOS DMG
if: matrix.os == 'macos-latest'
run: bash build/scripts/build_macos.sh
continue-on-error: true
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.artifact }}
path: build/dist/
retention-days: 30