diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 06b4289..40a30cb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,10 @@ jobs: pip install uv uv venv uv pip install -r requirements-dev.lock + - name: Run tests + run: | + source .venv/bin/activate + pytest build: runs-on: ubuntu-latest steps: diff --git a/pyproject.toml b/pyproject.toml index a96a273..6d57ab3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -34,9 +34,14 @@ classifiers = [ requires = ["hatchling"] build-backend = "hatchling.build" +[tool.pytest.ini_options] +testpaths = ["tests"] + [tool.rye] managed = true -dev-dependencies = [] +dev-dependencies = [ + "pytest~=8.0.1", +] [tool.rye.scripts] setup = {chain = ["setup:sync", "setup:pre-commit"]} diff --git a/requirements-dev.lock b/requirements-dev.lock index 4f06c20..f07105f 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -4,9 +4,16 @@ # last locked with the following flags: # pre: false # features: [] -# all-features: false +# all-features: true # with-sources: false -e file:. docutils==0.20.1 # via rst-multi-refs +iniconfig==2.0.0 + # via pytest +packaging==23.2 + # via pytest +pluggy==1.4.0 + # via pytest +pytest==8.0.1 diff --git a/requirements.lock b/requirements.lock index 4f06c20..5e069c4 100644 --- a/requirements.lock +++ b/requirements.lock @@ -4,7 +4,7 @@ # last locked with the following flags: # pre: false # features: [] -# all-features: false +# all-features: true # with-sources: false -e file:. diff --git a/tests/.ruff.toml b/tests/.ruff.toml new file mode 100644 index 0000000..d60ab9a --- /dev/null +++ b/tests/.ruff.toml @@ -0,0 +1,4 @@ +extend = "../pyproject.toml" + +[lint] +ignore = ["D100", "D103"] diff --git a/tests/test_it.py b/tests/test_it.py new file mode 100644 index 0000000..9a55af8 --- /dev/null +++ b/tests/test_it.py @@ -0,0 +1,2 @@ +def test_it(): + import rst_multi_refs # noqa