1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-06-22 23:46:50 +02:00

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: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
- name: Install test requirements - 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 - name: Run tests
continue-on-error: False continue-on-error: False
run: | run: |

View File

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

View File

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