Skip to content

Commit

Permalink
ci: use uv instead
Browse files Browse the repository at this point in the history
  • Loading branch information
waketzheng committed Oct 29, 2024
1 parent 99c10db commit 9880ad9
Showing 1 changed file with 7 additions and 22 deletions.
29 changes: 7 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,24 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local # the path depends on the OS
key: poetry-0 # increment to reset cache
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
- name: Configure poetry
if: steps.cached-poetry.outputs.cache-hit == 'true'
run: poetry config virtualenvs.in-project true
- name: Load cached venv
id: cached-poetry-dependencies
id: cached-dependencies
uses: actions/cache@v4
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
if: steps.cached-dependencies.outputs.cache-hit != 'true'
run: uv sync --all-extras --dev
env:
PYO3_USE_ABI3_FORWARD_COMPATIBILITY: 1
#----------------------------------------------
# install your root project, if package-mode is true
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
- name: Check code style and Type Hint
run: poetry run fast check
run: uv run fast check
- name: Verify pip conf script
run: ./pip_conf.py

Expand Down

0 comments on commit 9880ad9

Please sign in to comment.