build(python): migrate to uv (#5222)
This commit is contained in:
16
.github/workflows/ci-linux.yml
vendored
16
.github/workflows/ci-linux.yml
vendored
@@ -12,6 +12,9 @@ on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: '3.14'
|
||||
|
||||
jobs:
|
||||
build_linux:
|
||||
name: ${{ matrix.name }}
|
||||
@@ -161,7 +164,15 @@ jobs:
|
||||
id: python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.14'
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Setup uv
|
||||
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Sync Python tools
|
||||
run: uv sync --locked --only-group test --python "${PYTHON_VERSION}" --no-python-downloads --no-install-project
|
||||
|
||||
- name: Run tests
|
||||
id: test
|
||||
@@ -181,8 +192,7 @@ jobs:
|
||||
(steps.test.outcome == 'success' || steps.test.outcome == 'failure')
|
||||
working-directory: build
|
||||
run: |
|
||||
${{ steps.python.outputs.python-path }} -m pip install "..[test]"
|
||||
${{ steps.python.outputs.python-path }} -m gcovr --gcov-executable "gcov-${GCC_VERSION}" . -r ../src \
|
||||
uv run --locked --no-sync python -m gcovr --gcov-executable "gcov-${GCC_VERSION}" . -r ../src \
|
||||
--exclude-noncode-lines \
|
||||
--exclude-throw-branches \
|
||||
--exclude-unreachable-branches \
|
||||
|
||||
Reference in New Issue
Block a user