File tree Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Expand file tree Collapse file tree 4 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -10,13 +10,6 @@ concurrency:
10
10
cancel-in-progress : true
11
11
12
12
jobs :
13
- pre_commit :
14
- runs-on : ubuntu-latest
15
- steps :
16
- - uses : actions/checkout@v2
17
- - uses : actions/setup-python@v2
18
- -
uses :
pre-commit/[email protected]
19
-
20
13
test :
21
14
name : test ${{ matrix.py }} on ${{ matrix.os }}
22
15
runs-on : ${{ matrix.os }}
@@ -110,7 +103,7 @@ jobs:
110
103
111
104
publish :
112
105
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
113
- needs : [check, test, pre_commit ]
106
+ needs : [check, test]
114
107
runs-on : ubuntu-20.04
115
108
steps :
116
109
- name : Setup python to build package
Original file line number Diff line number Diff line change
1
+ ``devenv `` command does not respect specified path - by :user: `gaborbernat `.
Original file line number Diff line number Diff line change 1
1
from __future__ import annotations
2
2
3
+ import logging
3
4
from pathlib import Path
4
5
5
6
from tox .config .cli .parser import ToxParser
@@ -23,12 +24,12 @@ def tox_add_option(parser: ToxParser) -> None:
23
24
24
25
def devenv (state : State ) -> int :
25
26
opt = state .conf .options
26
-
27
27
opt .skip_missing_interpreters = False # the target python must exist
28
28
opt .no_test = False # do not run the test suite
29
29
opt .package_only = False
30
30
opt .install_pkg = None # no explicit packages to install
31
31
opt .skip_pkg_install = False # always install a package in this case
32
+ opt .no_test = True # do not run the test phase
32
33
33
34
state .envs .ensure_only_run_env_is_active ()
34
35
envs = list (state .envs .iter ())
@@ -38,7 +39,9 @@ def devenv(state: State) -> int:
38
39
usedevelop = True , # dev environments must be of type dev
39
40
env_dir = Path (opt .devenv_path ), # move it in source
40
41
)
41
-
42
- opt .no_test = True # do not run the test phase
43
- state .conf .get_env (envs [0 ], loaders = [loader ])
44
- return run_sequential (state )
42
+ tox_env = state .envs [envs [0 ]]
43
+ tox_env .conf .loaders .insert (0 , loader )
44
+ result = run_sequential (state )
45
+ if result == 0 :
46
+ logging .warning (f"created development environment under { tox_env .conf ['env_dir' ]} " )
47
+ return result
Original file line number Diff line number Diff line change @@ -15,8 +15,12 @@ def test_devenv_fail_multiple_target(tox_project: ToxProjectCreator) -> None:
15
15
@pytest .mark .integration ()
16
16
def test_devenv_ok (tox_project : ToxProjectCreator , enable_pip_pypi_access : str | None ) -> None : # noqa: U100
17
17
content = {"setup.py" : "from setuptools import setup\n setup(name='demo', version='1.0')" }
18
- outcome = tox_project (content ).run ("d" , "-e" , "py" )
18
+ project = tox_project (content )
19
+ outcome = project .run ("d" , "-e" , "py" )
20
+
19
21
outcome .assert_success ()
22
+ assert (project .path / "venv" ).exists ()
23
+ assert f"created development environment under { project .path / 'venv' } " in outcome .out
20
24
21
25
22
26
def test_devenv_help (tox_project : ToxProjectCreator ) -> None :
You can’t perform that action at this time.
0 commit comments