@@ -33,25 +33,23 @@ jobs:
3333 - " pypy3.9"
3434 exclude :
3535 - os : macos-latest
36- python-version : pypy3
36+ python-version : pypy3.9
3737
3838 steps :
3939 - uses : actions/checkout@v4
4040 with :
4141 # We want our tags here
4242 fetch-depth : 0
43- - uses : actions/setup-python@v5
43+ - name : Install the latest version of uv
44+ id : setup-uv
45+ uses : astral-sh/setup-uv@v3
4446 with :
45- python-version : " ${{ matrix.python-version }}"
46- - name : " Install dependencies"
47- run : |
48- python -VV
49- python -msite
50- python -m pip install --upgrade pip setuptools wheel
51- python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
47+ enable-cache : true
5248
5349 - name : " Run tox targets for ${{ matrix.python-version }}"
54- run : " python -m tox"
50+ env :
51+ TOX_GH_MAJOR_MINOR : ${{ matrix.python-version }}
52+ run : uvx --with tox-uv --with tox-gh tox
5553
5654 - name : Upload coverage data
5755 uses : actions/upload-artifact@v4
@@ -67,12 +65,11 @@ jobs:
6765 runs-on : ubuntu-latest
6866 steps :
6967 - uses : actions/checkout@v4
70- - uses : actions/setup-python@v5
68+ - name : Install the latest version of uv
69+ id : setup-uv
70+ uses : astral-sh/setup-uv@v3
7171 with :
72- python-version : " 3.12"
73-
74- - name : Install coverage
75- run : python -m pip install --upgrade coverage[toml]
72+ enable-cache : true
7673
7774 - name : Download coverage data
7875 uses : actions/download-artifact@v4
@@ -81,11 +78,12 @@ jobs:
8178 merge-multiple : true
8279
8380 - name : Combine coverage
84- run : python -m coverage combine
81+ run : |
82+ uvx --with coverage[toml] coverage combine
8583
8684 # ignore-errors is so that we don't gag on missing code in .tox environments
8785 - name : Generate the HTML report
88- run : python -m coverage html --skip-covered --skip-empty --ignore-errors
86+ run : uvx --with coverage[toml] coverage html --skip-covered --skip-empty --ignore-errors
8987
9088 - name : Upload the HTML report
9189 uses : actions/upload-artifact@v4
9593
9694 # ignore-errors is so that we don't gag on missing code in .tox environments
9795 - name : Enforce the coverage
98- run : python -m coverage report --ignore-errors --fail-under 95
96+ run : uvx --with coverage[toml] coverage report --ignore-errors --fail-under 95
9997
10098 package :
10199 name : " Build & verify package"
@@ -118,10 +116,14 @@ jobs:
118116
119117 steps :
120118 - uses : actions/checkout@v4
121- - uses : actions/setup-python@v5
119+ - name : Install the latest version of uv
120+ id : setup-uv
121+ uses : astral-sh/setup-uv@v3
122122 with :
123- python-version : " 3.12 "
123+ enable-cache : true
124124 - name : " Install in dev mode"
125- run : " python -m pip install -e .[dev]"
125+ run : |
126+ uv venv
127+ uv pip install -e .[dev]
126128 - name : " Import package"
127- run : " python -c 'import hamcrest; print(hamcrest.__version__)'"
129+ run : " uv run python -c 'import hamcrest; print(hamcrest.__version__)'"
0 commit comments