@@ -31,34 +31,27 @@ jobs:
31
31
- windows-latest
32
32
- macos-latest
33
33
steps :
34
- - name : Setup python for tox
35
- uses : actions/setup-python@v5
36
- with :
37
- python-version : " 3.12"
38
34
- uses : actions/checkout@v4
39
35
with :
40
36
fetch-depth : 0
41
- - name : Install self-tox
42
- run : python -m pip install .
43
- - name : Setup python for test ${{ matrix.py }}
44
- uses : actions/setup-python@v5
37
+ - name : Install the latest version of uv
38
+ uses : astral-sh/setup-uv@v3
45
39
with :
46
- python-version : ${{ matrix.py }}
47
- allow-prereleases : true
48
- - name : Pick environment to run
49
- run : |
50
- import os; import platform; import sys; from pathlib import Path
51
- env = f'TOXENV=py{"" if platform.python_implementation() == "CPython" else "py"}3{sys.version_info.minor}'
52
- print(f"Picked: {env} for {sys.version} based of {sys.executable}")
53
- with Path(os.environ["GITHUB_ENV"]).open("ta") as file_handler:
54
- file_handler.write(env)
55
- shell : python
40
+ enable-cache : true
41
+ cache-dependency-glob : " pyproject.toml"
42
+ github-token : ${{ secrets.GITHUB_TOKEN }}
43
+ - name : Add .local/bin to Windows PATH
44
+ if : runner.os == 'Windows'
45
+ shell : bash
46
+ run : echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
47
+ - name : Install tox@self
48
+ run : uv tool install --python-preference only-managed --python ${{ matrix.py }} tox@.
56
49
- name : Setup test suite
57
- run : tox r -vv --notest --skip-missing-interpreters false
50
+ run : tox run -vv --notest --skip-missing-interpreters false -e ${{ matrix.py }}
58
51
- name : Run test suite
59
- run : tox r --skip-pkg-install
52
+ run : tox run --skip-pkg-install -e ${{ matrix.py }}
60
53
env :
61
- CI_RUN : " yes "
54
+ PYTEST_ADDOPTS : " -vv --durations=20 "
62
55
DIFF_AGAINST : HEAD
63
56
PYTEST_XDIST_AUTO_NUM_WORKERS : 0
64
57
@@ -77,19 +70,24 @@ jobs:
77
70
- ubuntu-latest
78
71
- windows-latest
79
72
exclude :
80
- - { os: windows-latest, tox_env: pkg_meta }
81
73
- { os: windows-latest, tox_env: docs }
82
74
steps :
83
75
- uses : actions/checkout@v4
84
76
with :
85
77
fetch-depth : 0
86
- - name : Setup Python 3.12
87
- uses : actions /setup-python@v5
78
+ - name : Install the latest version of uv
79
+ uses : astral-sh /setup-uv@v3
88
80
with :
89
- python-version : " 3.12"
90
- - name : Install self-tox
91
- run : python -m pip install .
81
+ enable-cache : true
82
+ cache-dependency-glob : " pyproject.toml"
83
+ github-token : ${{ secrets.GITHUB_TOKEN }}
84
+ - name : Add .local/bin to Windows PATH
85
+ if : runner.os == 'Windows'
86
+ shell : bash
87
+ run : echo "$USERPROFILE/.local/bin" >> $GITHUB_PATH
88
+ - name : Install tox@self
89
+ run : uv tool install --python-preference only-managed --python 3.13 tox@.
92
90
- name : Setup check suite
93
- run : tox r -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
91
+ run : tox r -vv --notest --skip-missing-interpreters false -e ${{ matrix.tox_env }}
94
92
- name : Run check for ${{ matrix.tox_env }}
95
93
run : tox r --skip-pkg-install -e ${{ matrix.tox_env }}
0 commit comments