Split test and dev group

This commit is contained in:
Simon Sawicki 2024-05-11 09:20:29 +02:00
parent 9a890f9d1f
commit f26010b5b5
No known key found for this signature in database
3 changed files with 12 additions and 16 deletions

View file

@ -53,7 +53,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
- name: Install test requirements
run: python3 ./devscripts/install_deps.py --include dev --include curl-cffi
run: python3 ./devscripts/install_deps.py --include test --include curl-cffi
- name: Run tests
continue-on-error: False
run: |

View file

@ -15,7 +15,7 @@ jobs:
with:
python-version: '3.8'
- name: Install test requirements
run: python3 ./devscripts/install_deps.py --include dev
run: python3 ./devscripts/install_deps.py --include test
- name: Run tests
run: |
python3 -m yt_dlp -v || true

View file

@ -67,8 +67,13 @@ build = [
dev = [
"autopep8~=2.0",
"pre-commit",
"pytest",
"ruff==0.4.*",
"ruff~=0.4",
]
test = [
"pytest~=8.1",
"pytest-randomly~=3.15",
"pytest-rerunfailures~=14.0",
"pytest-xdist[psutil]~=3.5",
]
pyinstaller = [
"pyinstaller>=6.3; sys_platform!='darwin'",
@ -124,7 +129,7 @@ path = "yt_dlp/version.py"
pattern = "_pkg_version = '(?P<version>[^']+)'"
[tool.hatch.envs.default]
features = ["dev"]
features = ["default", "dev", "test"]
path = ".venv"
[tool.hatch.envs.default.scripts]
@ -133,10 +138,7 @@ yt-dlp = "python -Werror -Xdev -m yt_dlp {args}"
[tool.hatch.envs.hatch-static-analysis]
detached = true
dependencies = [
"autopep8~=2.0",
"ruff==0.4.*",
]
features = ["dev"]
config-path = "pyproject.toml"
[tool.hatch.envs.hatch-static-analysis.scripts]
@ -146,13 +148,7 @@ lint-check = "ruff check {args:.}"
lint-fix = "ruff check --fix {args:.}"
[tool.hatch.envs.hatch-test]
features = ["default"]
dependencies = [
"pytest~=8.1",
"pytest-randomly~=3.15",
"pytest-rerunfailures~=14.0",
"pytest-xdist[psutil]~=3.5",
]
features = ["curl-cffi", "default", "test"]
[tool.hatch.envs.hatch-test.scripts]
run = "python -m devscripts.run_tests {args}"