Skip to content

Commit 704819b

Browse files
authored
Setup test framework (BioStructBenchmark#20)
* implement pytest * add testing to github CI * update pyproject.toml dependency groups * remove permissions test
1 parent fe48be5 commit 704819b

File tree

5 files changed

+2203
-1
lines changed

5 files changed

+2203
-1
lines changed

.github/workflows/run_tests.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# This workflow will install Python dependencies and run tests with pytest
2+
3+
name: Run unit tests
4+
5+
on:
6+
push:
7+
branches: [ "main" ]
8+
paths-ignore:
9+
- README.md
10+
pull_request:
11+
branches: [ "main" ]
12+
paths-ignore:
13+
- README.md
14+
15+
jobs:
16+
build:
17+
runs-on: ubuntu-latest
18+
strategy:
19+
matrix:
20+
python-version: ["3.13"]
21+
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Set up Python ${{ matrix.python-version }}
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install --group test -e .
32+
- name: Test with pytest
33+
run: pytest -v
34+
35+

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ lint = [
3434
"pylint==3.3.7"
3535
]
3636
dev = [
37-
"biostructbenchmark[test,lint]",
37+
{include-group = "test"},
38+
{include-group = "lint"},
3839
"twine==6.1.0"
3940
]
41+
42+
[tool.pytest.ini_options]
43+
minversion = "6.0"
44+
addopts = "-ra -q"
45+
pythonpath = "."
46+
testpaths = "tests"

0 commit comments

Comments
 (0)