Skip to content

Commit 809af0d

Browse files
committed
ci: added minimal testing setup
1 parent beaa8a5 commit 809af0d

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

.github/workflows/test.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ jobs:
5959
eegnb --help
6060
echo "second test: runexp with no args"
6161
eegnb runexp
62+
- name: Run examples with coverage
63+
shell: bash
64+
run: |
65+
pytest
6266
6367
typecheck:
6468
runs-on: ${{ matrix.os }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,8 @@ doc/_build
88

99
# Built by auto_examples
1010
examples/visual_cueing/*.csv
11+
12+
# tests/coverage artifacts
13+
.coverage
14+
coverage.xml
15+
htmlcov

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[tool.pytest.ini_options]
2+
minversion = "6.0"
3+
addopts = "--cov-report=term --cov-report=xml --cov-report=html --cov=eegnb --nbval-lax --current-env --ignore-glob '*r__*.py'"
4+
testpaths = [
5+
"eegnb",
6+
"examples",
7+
]
8+
python_files = ["*.py", "*.ipynb"]

requirements.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,16 @@ pywinhook==1.6.0; platform_system == "Windows"
1616
pyserial==3.5
1717
h5py>=3.1.0
1818
pyo>=1.0.3; platform_system == "Linux"
19+
20+
# This might try to build from source on linux (since there are no wheels for Linux on PyPI)
21+
# You can pass `--find-links=https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-20.04/` your `pip install` to use the prebuilt wheels at the link.
1922
wxPython>=4.0 ; platform_system == "Linux"
2023

2124
# Test requirements
22-
mypy>=0.790
25+
mypy
26+
pytest
27+
pytest-cov
28+
nbval
2329

2430
# Docs requirements
2531
sphinx==3.1.1

0 commit comments

Comments
 (0)