mirror of
https://github.com/django-polymorphic/django-polymorphic.git
synced 2026-02-14 02:30:23 +03:00
fix uv test locking
This commit is contained in:
parent
7645431fb9
commit
1aab9121dc
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
|
|
@ -69,7 +69,7 @@ jobs:
|
|||
- name: Install Dependencies
|
||||
run: |
|
||||
just setup ${{ steps.sp.outputs.python-path }}
|
||||
uv add Django~=${{ matrix.django-version }}.0
|
||||
just test-lock Django~=${{ matrix.django-version }}.0
|
||||
just install-docs
|
||||
- name: Install Emacs
|
||||
if: ${{ github.event.inputs.debug == 'true' }}
|
||||
|
|
|
|||
13
justfile
13
justfile
|
|
@ -162,6 +162,19 @@ fix: lint format
|
|||
# run all static checks
|
||||
check: check-lint check-format check-types check-package check-docs check-docs-links _check-readme-quiet
|
||||
|
||||
[script]
|
||||
_lock-python:
|
||||
import tomlkit
|
||||
import sys
|
||||
f='pyproject.toml'
|
||||
d=tomlkit.parse(open(f).read())
|
||||
d['project']['requires-python']='=={}'.format(sys.version.split()[0])
|
||||
open(f,'w').write(tomlkit.dumps(d))
|
||||
|
||||
# lock to specific python and versions of given dependencies
|
||||
test-lock +PACKAGES: _lock-python
|
||||
uv add {{ PACKAGES }}
|
||||
|
||||
# run tests
|
||||
test *TESTS:
|
||||
@just run pytest --cov-append {{ TESTS }}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user