test: define CI configuration acceptance for #190
This commit is contained in:
19
tests/test_ci_config.py
Normal file
19
tests/test_ci_config.py
Normal file
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def test_requirements_makefile_and_workflow_exist() -> None:
|
||||
assert Path("requirements.txt").exists()
|
||||
assert Path("Makefile").exists()
|
||||
assert Path(".gitea/workflows/test.yml").exists()
|
||||
|
||||
|
||||
def test_ci_workflow_runs_project_test_command() -> None:
|
||||
workflow = Path(".gitea/workflows/test.yml").read_text(encoding="utf-8")
|
||||
requirements = Path("requirements.txt").read_text(encoding="utf-8")
|
||||
makefile = Path("Makefile").read_text(encoding="utf-8")
|
||||
|
||||
assert "pytest" in requirements
|
||||
assert "test:" in makefile
|
||||
assert "python3 -m pytest tests/test_ci_config.py scripts/test_*.py -v" in makefile
|
||||
assert "pip install -r requirements.txt" in workflow
|
||||
assert "make test" in workflow
|
||||
Reference in New Issue
Block a user