chore(deps): bump astral-sh/setup-uv from 5.1.0 to 5.2.1 (#452) #344
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Python Package | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.12" | |
- "3.13" | |
steps: | |
- name: Checkout Repo | |
uses: actions/[email protected] | |
- name: Setup uv | |
uses: astral-sh/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Sanity check Python version | |
# https://docs.python.org/3/using/cmdline.html#cmdoption-version | |
run: | | |
uv run --frozen python --version --version | |
[[ "$(uv run --frozen python --version)" == Python\ ${{ matrix.python-version }}* ]] | |
- name: Check format (ruff) | |
run: uv run --frozen ruff format --check . | |
- name: Lint (ruff) | |
run: uv run --frozen ruff check --output-format=github . | |
- name: Check types (mypy) | |
run: uv run --frozen mypy . | |
- name: Run tests | |
run: uv run --frozen pytest --cov=. --cov-report=xml | |
# consider ditching codecov - https://hynek.me/articles/ditch-codecov-python/ | |
- name: Upload coverage to Codecov | |
uses: codecov/[email protected] | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
check: | |
if: always() | |
runs-on: Ubuntu-latest | |
needs: | |
- build | |
steps: | |
- name: Print job results | |
run: echo '${{ toJSON(needs) }}' | |
- name: Check if all jobs succeeded | |
uses: re-actors/[email protected] | |
with: | |
jobs: ${{ toJSON(needs) }} |