Skip to content

Commit

Permalink
Merge pull request #571 from sanders41/ci-cd
Browse files Browse the repository at this point in the history
Update CI/CD to use setup-uv and uv publish
  • Loading branch information
sanders41 authored Oct 27, 2024
2 parents 7b9578b + 913be60 commit 1073da4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 29 deletions.
28 changes: 6 additions & 22 deletions .github/workflows/ci.yaml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install Dependencies
run: uv sync --frozen --all-extras
- name: mypy check
run: uv run mypy camel_converter tests
- name: Minimize uv cache
run: uv cache prune --ci
testing:
strategy:
fail-fast: false
Expand All @@ -45,19 +37,13 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Restore uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
uv-${{ runner.os }}
- name: Install Dependencies
run: uv sync --frozen --all-extras
- name: Test with pytest
Expand All @@ -68,5 +54,3 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Minimize uv cache
run: uv cache prune --ci
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
uses: astral-sh/setup-uv@v3
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Dependencies
run: uv sync --frozen --all-extras
- name: Build and publish package
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: "${{ secrets.PYPI_API_KEY }}"
run: |
uvx --from build pyproject-build --installer uv
uvx twine upload dist/*
run: uv publish
File renamed without changes.

0 comments on commit 1073da4

Please sign in to comment.