Use ubuntu base and installing uv to manage dependencies and run checks
- Replaces containerized linting with uv for dependency management. - Installs uv and adds its bin directory to the PATH. - Uses uv to install and run Ruff, Mypy, Pytest, and Coverage. - Simplifies the workflow by using uv for all checks and tests.
This commit is contained in:
parent
7b728d90e0
commit
b9a12a97fd
@ -7,26 +7,37 @@ on:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/astral-sh/uv:0.6-python3.13-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run Ruff & Mypy
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Lint with ruff and mypy
|
||||
run: |
|
||||
uv pip install ruff mypy
|
||||
uv run ruff check
|
||||
uv run ruff format --check
|
||||
uv run mypy .
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: ghcr.io/astral-sh/uv:0.6-python3.13-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run Pytest
|
||||
|
||||
- name: Install uv
|
||||
run: |
|
||||
curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
uv pip install pytest coverage
|
||||
uv run pytest -v --cov=. --cov-report=xml
|
||||
|
||||
- name: Upload to Codecov
|
||||
run: bash <(curl -s https://codecov.io/bash)
|
||||
|
Loading…
x
Reference in New Issue
Block a user