Skip to content

Migrate to uv

Migrate to uv #393

name: Test Redistribute
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
test-redistribute:
runs-on: ubuntu-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- uses: actions/checkout@v5
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version-file: "pyproject.toml"
# Issue ref: https://github.com/actions/setup-python/issues/436
# cache: "pip"
# cache-dependency-path: pyproject.toml
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Build source distribution
run: uv build --sdist
- name: Decompress source distribution
run: |
cd dist
tar xvf fastapi_cloud_cli*.tar.gz
- name: Install test dependencies
run: |
cd dist/fastapi_cloud_cli*/
pip install --group dev .
- name: Run source distribution tests
run: |
cd dist/fastapi_cloud_cli*/
bash scripts/test.sh
- name: Build wheel distribution
run: |
cd dist
pip wheel --no-deps fastapi_cloud_cli*.tar.gz