Skip to content

Commit 1881ea5

Browse files
committed
ci: Configure pytest for testing sources
1 parent 04723c3 commit 1881ea5

File tree

6 files changed

+25
-3
lines changed

6 files changed

+25
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ jobs:
3232
pip install uv
3333
uv venv
3434
uv pip install -r requirements-dev.lock
35+
- name: Run tests
36+
run: |
37+
source .venv/bin/activate
38+
pytest
3539
build:
3640
runs-on: ubuntu-latest
3741
steps:

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,14 @@ classifiers = [
3434
requires = ["hatchling"]
3535
build-backend = "hatchling.build"
3636

37+
[tool.pytest.ini_options]
38+
testpaths = ["tests"]
39+
3740
[tool.rye]
3841
managed = true
39-
dev-dependencies = []
42+
dev-dependencies = [
43+
"pytest~=8.0.1",
44+
]
4045

4146
[tool.rye.scripts]
4247
setup = {chain = ["setup:sync", "setup:pre-commit"]}

requirements-dev.lock

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,16 @@
44
# last locked with the following flags:
55
# pre: false
66
# features: []
7-
# all-features: false
7+
# all-features: true
88
# with-sources: false
99

1010
-e file:.
1111
docutils==0.20.1
1212
# via rst-multi-refs
13+
iniconfig==2.0.0
14+
# via pytest
15+
packaging==23.2
16+
# via pytest
17+
pluggy==1.4.0
18+
# via pytest
19+
pytest==8.0.1

requirements.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# last locked with the following flags:
55
# pre: false
66
# features: []
7-
# all-features: false
7+
# all-features: true
88
# with-sources: false
99

1010
-e file:.

tests/.ruff.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extend = "../pyproject.toml"
2+
3+
[lint]
4+
ignore = ["D100", "D103"]

tests/test_it.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
def test_it():
2+
import rst_multi_refs # noqa

0 commit comments

Comments
 (0)