mirror of
https://github.com/val1813/kwcode.git
synced 2026-09-03 06:34:30 +08:00
feat: add multi-platform CI testing matrix
- Add GitHub Actions workflow for cross-platform testing - Test matrix: Ubuntu/macOS/Windows × Python 3.10/3.11/3.12 - Run full test suite on all platforms - Verify basic functionality (GPU detection, memory info) - Update README badge to show CI status Improves platform compatibility confidence and catches platform-specific issues early. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
40
.github/workflows/test.yml
vendored
Normal file
40
.github/workflows/test.yml
vendored
Normal file
@@ -0,0 +1,40 @@
|
||||
name: Multi-Platform Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master, main ]
|
||||
pull_request:
|
||||
branches: [ master, main ]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
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
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -e ".[dev]"
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
python -m pytest kaiwu/tests/ -v --ignore=kaiwu/tests/bench_tasks
|
||||
|
||||
- name: Test import and basic functionality
|
||||
run: |
|
||||
python -c "import kaiwu.core.sysinfo; info = kaiwu.core.sysinfo.get_sysinfo(); print(f'Platform test OK: GPU={info.gpu_name}, RAM={info.ram_total_gb:.1f}GB')"
|
||||
Reference in New Issue
Block a user