Skip to content

Merge pull request #31 from stefanofusai/27-sync-uv-versions #96

Merge pull request #31 from stefanofusai/27-sync-uv-versions

Merge pull request #31 from stefanofusai/27-sync-uv-versions #96

Workflow file for this run

name: CI/CD Pipeline
on:
push:
pull_request:
release:
types:
- published
permissions:
contents: read
jobs:
run-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.12
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v4
with:
version: 0.5.4
enable-cache: true
cache-dependency-glob: .requirements/testing.txt
- name: Install requirements
run: uv pip install -r .requirements/testing.txt
env:
UV_SYSTEM_PYTHON: 1
- name: Run tests
run: pytest
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
publish-to-pypi:
if: github.event_name == 'release' && github.event.action == 'published'
needs: run-tests
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
strategy:
matrix:
python-version:
- 3.12
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1.8