Skip to content

switch docker build to uv #1

switch docker build to uv

switch docker build to uv #1

Workflow file for this run

# This workflow will install Python dependencies, run tests,
# and report test results and code coverage as artifacts. It will
# be called by the workflow that runs tests against new PRs and as
# a first step in the workflow that publishes new Docker images.
name: A reusable workflow to build and run the unit test suite
on:
push:
workflow_dispatch:
env:
PYTHON_VERSION: "3.12"
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- name: Retrieve repository
uses: actions/checkout@v6
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: uv sync --extra dev --frozen
- name: Run Linting
run: |
uv run ruff check batchee
- name: Run tests with coverage
run: |
uv run pytest --cov=batchee --cov-report=xml:build/reports/coverage.xml --cov-report=html:build/reports/coverage.html tests/
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true