Skip to content

Commit

Permalink
Use tox-uv in CI (#597)
Browse files Browse the repository at this point in the history
* Use tox-uv in CI

* Vroom vroom dev env

* Windows

* Consistency
  • Loading branch information
hynek authored Mar 5, 2024
1 parent 555c387 commit 6b82c5c
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- run: python -Im pip install tox
- run: python -Im pip install tox-uv

- run: python -Im tox run --installpkg dist/*.whl -f py$(echo ${{ matrix.python-version }} | tr -d .)

Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
python-version-file: .python-version-default
allow-prereleases: true
cache: pip
- run: python -Im pip install tox
- run: python -Im pip install tox-uv

- run: python -Im tox run --installpkg dist/*.whl -e mypy-pkg

Expand All @@ -136,7 +136,7 @@ jobs:
python-version-file: .python-version-default
allow-prereleases: true
cache: pip
- run: python -Im pip install tox
- run: python -Im pip install tox-uv

- run: python -Im tox run --installpkg dist/*.whl -e pyright

Expand All @@ -156,7 +156,7 @@ jobs:
# Keep in sync with tox.ini/docs & .readthedocs.yaml
python-version: "3.12"
cache: pip
- run: python -Im pip install tox
- run: python -Im pip install tox-uv

- run: python -Im tox run -e docs

Expand All @@ -174,8 +174,14 @@ jobs:
python-version-file: .python-version-default
cache: pip

- run: python -Im pip install -e .[dev]
- run: python -Ic 'import structlog; print(structlog.__version__)'
- run: python -Im pip install uv
- run: uv venv
- run: uv pip install -e .[dev]

- run: .venv/bin/python -Ic 'import structlog; print(structlog.__version__)'
if: runner.os != 'Windows'
- run: .\.venv\Scripts\python.exe -Ic 'import structlog; print(structlog.__version__)'
if: runner.os == 'Windows'

required-checks-pass:
name: Ensure everything required is passing for branch protection
Expand All @@ -196,7 +202,6 @@ jobs:
with:
jobs: ${{ toJSON(needs) }}


colors:
name: Visual check for color settings using env variables
needs: build-package
Expand All @@ -209,6 +214,6 @@ jobs:
python-version-file: .python-version-default
cache: pip
# tox 4.12.0 started passing FORCE_COLOR and NO_COLOR by default.
- run: python -Im pip install 'tox>=4.12.0'
- run: python -Im pip install 'tox>=4.12.0' tox-uv

- run: python -Im tox run -f color

0 comments on commit 6b82c5c

Please sign in to comment.