Skip to content

Commit

Permalink
Use uv in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pederhan committed Sep 2, 2024
1 parent 0aa1665 commit 016fb5b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,16 @@ jobs:
- name: Exit if not on master branch
if: github.ref_name != 'master'
run: exit -1


- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'

- uses: hynek/setup-cached-uv@v2

- name: Install build dependencies
run: python -m pip install --upgrade build
run: uv pip install --system --upgrade build

- name: Build source distribution
run: python -m build
Expand All @@ -47,11 +54,10 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: hynek/setup-cached-uv@v2
- name: Run PyInstaller with Tox
run: |
python -m ensurepip --upgrade
python -m pip install tox tox-uv tox-gh-actions
uv pip install --system tox-uv tox-gh-actions
tox
- name: Rename binary
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,14 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
# - name: Cache pip
# uses: actions/cache@v3
# with:
# path: ~/.cache/pip
# key: v1-pip-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('requirements-*.txt') }}
# restore-keys: |
# v1-pip-${{ runner.os }}-${{ matrix.python-version }}
# v1-pip-${{ runner.os }}
# v1-pip-
- uses: hynek/setup-cached-uv@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install mreg-cli
run: |
python -m ensurepip --upgrade
pip install -e .[dev]
uv pip install --system -e .[dev]
- name: Test and compare api calls
run: ci/run_testsuite_and_record.sh

Expand All @@ -53,10 +44,11 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- uses: hynek/setup-cached-uv@v2
- name: Install dependencies
run: |
python -m ensurepip --upgrade
python -m pip install tox tox-uv tox-gh-actions
uv pip install --system tox-uv tox-gh-actions
- name: Test with tox
run: tox r

0 comments on commit 016fb5b

Please sign in to comment.