Skip to content

Feat/update docker flow #24

Feat/update docker flow

Feat/update docker flow #24

Workflow file for this run

name: Unit Test & Coverage
on:
pull_request:
branches:
- '*'
jobs:
unit-test-coverage:
runs-on: ubuntu-latest
permissions:
contents: read
env:
UV_VERSION: '0.9.28'
PYTHON_VERSION: '3.13'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Restore uv caches
id: cache-restore
uses: actions/cache/restore@v5
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}
restore-keys: |
uv-main-
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: ${{ env.UV_VERSION }}
python-version: ${{ env.PYTHON_VERSION }}
enable-cache: false
- name: Install dependencies
run: uv sync
- name: Run Unit Tests with Coverage
run: |
uv run -- coverage run -m pytest
uv run -- coverage report --show-missing
- name: Save uv caches
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: |
~/.cache/uv
~/.local/share/uv
.venv
key: uv-main-${{ env.UV_VERSION }}-${{ env.PYTHON_VERSION }}-${{ hashFiles('pyproject.toml', 'uv.lock') }}