Skip to content

Commit 2a64f4f

Browse files
authored
Merge pull request #832 from akaihola/more-uv
Use `uv` even more in CI
2 parents 7e23b9f + cc7a0c6 commit 2a64f4f

File tree

4 files changed

+14
-12
lines changed

4 files changed

+14
-12
lines changed

.github/workflows/python-package.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,17 @@ jobs:
101101
- '3.11'
102102
- '3.12'
103103
- '3.13'
104-
constraints: ['']
105104
post_install: ['']
106105
include:
107106
- os: ubuntu-latest
108107
python-version: '3.9'
109108
post_install: uv sync --resolution lowest-direct
110109
- os: ubuntu-latest
111110
python-version: '3.13'
112-
post_install: uv sync --upgrade
111+
post_install: uv pip install
112+
--upgrade
113+
--requirements constraints-future.txt
114+
113115
needs:
114116
- build-wheel
115117
steps:
@@ -129,13 +131,13 @@ jobs:
129131
- name: Download wheel uploaded by the build-wheel job
130132
uses: actions/download-artifact@v4
131133
- name: Install Darker and its dependencies from the wheel built earlier
132-
run: pip install "${{needs.build-wheel.outputs.wheel-path}}[dev]"
133-
${{ matrix.upgrade }} ${{ matrix.constraints }}
134+
run: uv pip install --group=dev "${{needs.build-wheel.outputs.wheel-path}}"
134135
- name: Downgrade target-version when running oldest supported Black
135-
if: matrix.constraints == '--constraint constraints-oldest.txt'
136+
if: matrix.post_install == 'uv sync --resolution lowest-direct'
136137
run: |
137138
sed -i 's/, "py311", "py312"//' pyproject.toml
138-
- name: Upgrade Black, Flynt and Isort from GitHub if future constraints are used
139+
- name: Upgrade/downgrade packages for future/oldest test
140+
# Upgrade Black, Flynt and Isort from GitHub if future constraints are used.
139141
# This can't be done in the same Pip invocation as installing Darker
140142
# since Darker might place an upper limit on Black, Flynt and/or Isort during
141143
# compatibility fixing periods.

.github/workflows/safety.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v4
1212
- uses: actions/setup-python@v5
13-
- name: Install uv
14-
uses: astral-sh/setup-uv@v4
13+
with:
14+
python-version: '3.x'
15+
- uses: astral-sh/setup-uv@v4
1516
with:
1617
enable-cache: true
1718
cache-dependency-glob: |
1819
**/setup.cfg
1920
**/pyproject.toml
20-
- run: uvx --from pip-tools pip-compile setup.cfg
2121
- name: Check dependencies for known security vulnerabilities using Safety
22-
run: uvx safety check --file requirements.txt
22+
- run: uv pip compile pyproject.toml | uvx safety check --file -

CHANGES.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ These features will be included in the next release:
55

66
Added
77
-----
8-
- CI workflow, enable caching of packages via uv across all actions
98
- Drop python 3.8, add python 3.13 official support
109
- New exit codes 2 for file not found, 3 for invalid command line arguments, 4 for
1110
missing dependencies and 123 for unknown failures.
@@ -64,6 +63,7 @@ Internal
6463
- Update to Mypy 1.15+ and use the ``explicit-any`` ignore.
6564
- Switch from old defunct Bandit action to ``brunohaf/action-bandit``.
6665
- Format YAML files to satisfy yaml-lint and fix workflow syntax.
66+
- Use UV across all CI workflow actions, and enable caching of packages.
6767

6868

6969
2.1.1_ - 2024-04-16

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ classifiers = [
1717
]
1818
requires-python = ">=3.9"
1919
dependencies = [
20-
"darkgraylib~=2.2.0",
20+
"darkgraylib>=2.4.0,<3.0.dev0",
2121
"toml>=0.10.0",
2222
"typing_extensions>=4.0.1",
2323
]

0 commit comments

Comments
 (0)