Skip to content

Commit

Permalink
use uv instead of poetry
Browse files Browse the repository at this point in the history
  • Loading branch information
yehoshuadimarsky committed Nov 20, 2024
1 parent 610cd84 commit 978fb8d
Show file tree
Hide file tree
Showing 5 changed files with 1,822 additions and 2,039 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
paths:
- bcpandas/**
- pyproject.toml
- poetry.lock
- uv.lock
workflow_dispatch:
inputs:
reason:
Expand All @@ -32,16 +32,25 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: snok/install-poetry@v1
version: "0.5.x"
enable-cache: true

- name: Set up Python
run: uv python install ${{ matrix.python-version }}

- name: Install dependencies
run: poetry install --only main,test
run: uv sync

- name: Install package
run: uv pip install --no-deps .

- name: Pull MSSQL server Docker image
run: docker pull mcr.microsoft.com/mssql/server:2022-latest

- name: Install BCP Utility
run: |
# https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15#ubuntu
Expand All @@ -51,10 +60,13 @@ jobs:
sudo apt-get install mssql-tools unixodbc-dev
echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc
source ~/.bashrc
- name: Test BCP
run: bcp -v

- name: Run tests
run: poetry run python -m pytest -x --cov-report=xml tests
run: uv run --frozen pytest -x --cov-report=xml tests

- name: Upload codecov
uses: codecov/codecov-action@v3
with:
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,17 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4

- name: Install uv
uses: astral-sh/setup-uv@v3
with:
python-version: "3.11"
- name: Install poetry
uses: snok/install-poetry@v1
version: "0.5.x"
enable-cache: true

- name: Build and publish
run: |
poetry version ${{ github.event.release.tag_name }}
poetry build
poetry publish \
poetry version ${{ github.event.release.tag_name }} # TODO change for uv!
uv build
uv publish \
--username "${{ secrets.PYPI_USERNAME }}" \
--password "${{ secrets.PYPI_PASSWORD }}"
Loading

0 comments on commit 978fb8d

Please sign in to comment.