-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (50 loc) · 1.64 KB
/
Copy pathtests-core.yml
File metadata and controls
59 lines (50 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Test Core (No GUI)
on:
push:
branches:
- master
- main
- development
pull_request:
branches:
- master
- main
- development
jobs:
test-core:
name: Core Tests - Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install core dependencies only
run: |
python -m pip install --upgrade pip
pip install -e .
pip install pytest pytest-cov
- name: Verify GUI not imported
run: |
python -c "import pyneuromatic; print('✓ Core imported successfully')"
python -c "import sys; import pyneuromatic; assert 'PyQt6' not in sys.modules, 'PyQt6 should not be imported'"
- name: Run core tests
run: |
pytest tests/test_core/ tests/test_analysis/ -v --cov=pyneuromatic --cov-report=xml --cov-report=term -m "not gui"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
flags: core
name: core-${{ matrix.os }}-${{ matrix.python-version }}
continue-on-error: true
- name: Lint with flake8
run: |
pip install flake8
flake8 pyneuromatic/core/ pyneuromatic/analysis/ --count --show-source --max-line-length=127 --statistics