Skip to content

Commit

Permalink
feat(ci): use uv to install dependencies
Browse files Browse the repository at this point in the history
This simplifies the workflow files and performs faster.
  • Loading branch information
nijel committed Feb 17, 2025
1 parent 5eb3e8e commit d904041
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
26 changes: 10 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- uses: astral-sh/setup-uv@v5
with:
cache-suffix: ${{ matrix.python-version }}

- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -qq -y --no-install-recommends libxmlsec1-dev swig
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Type check with tox
run: tox -e "py${PYTHON_VERSION/\./}-pyright"
run: uvx tox -e "py${PYTHON_VERSION/\./}-pyright"

test:
runs-on: ubuntu-24.04
Expand All @@ -65,21 +62,18 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: requirements*.txt

- uses: astral-sh/setup-uv@v5
with:
cache-suffix: ${{ matrix.python-version }}

- name: Install System dependencies
run: |
sudo apt-get update
sudo apt-get install -qq -y --no-install-recommends libxmlsec1-dev swig
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install coverage tox
- name: Test with tox
run: tox -e "py${PYTHON_VERSION/\./}"
run: uvx tox -e "py${PYTHON_VERSION/\./}"

- uses: codecov/codecov-action@v5
with:
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ envlist = py39,py310,py311,py312,py313,py39-pyright,p313-pyright

[testenv]
passenv = *
install_command = python -I -m pip install --no-binary lxml --no-binary xmlsec {opts} {packages}
allowlist_externals =
uv
install_command = uv pip install --no-binary lxml --no-binary xmlsec {opts} {packages}
deps =
py{39,310,311,312,313}: -e .[dev,all]
commands =
Expand Down

0 comments on commit d904041

Please sign in to comment.