Skip to content

chore(deps): Update python-dependencies #404

chore(deps): Update python-dependencies

chore(deps): Update python-dependencies #404

Workflow file for this run

# linting - Github Actions
#
# Used actions:
# - actions/checkout
# repo: https://github.com/actions/checkout
# releases: https://github.com/actions/checkout/tags
#
# - astral-sh/setup-uv: set up uv environment
# repo: https://github.com/astral-sh/setup-uv
# releases: https://github.com/astral-sh/setup-uv/tags
# https://docs.astral.sh/uv/guides/integration/github/
name: Linting 🧹
concurrency:
# see https://docs.github.com/en/actions/using-jobs/using-concurrency
# Run jobs on all commits - we're on free tier and want full diagnostic history
# cancel-in-progress: ${{ github.event_name == 'pull_request' }}
group: ${{ github.workflow }}-${{ github.ref }}
env:
# Enable colored output for pytest
# https://github.com/pytest-dev/pytest/issues/7443
# https://github.com/actions/runner/issues/241
PY_COLORS: 1
# Pin just version for reproducible builds
# https://github.com/casey/just/releases
JUST_VERSION: "1.58.0"
# Pin uv version for reproducible builds
# https://github.com/astral-sh/uv/releases
UV_VERSION: "0.12.6"
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
permissions:
contents: read
jobs:
# see https://docs.astral.sh/uv/guides/integration/github/
run-tests:
name: Python linters
runs-on: ${{ matrix.os }}
timeout-minutes: 5
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
python-version:
- "3.15"
- "3.14"
- "3.13"
- "3.12"
- "3.11"
- "3.10"
- "3.9"
steps:
# repo: https://github.com/actions/checkout
# releases: https://github.com/actions/checkout/tags
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
fetch-depth: 0
# - name: Show env variables
# run: |
# echo "$HOME/bin" >> $GITHUB_PATH
# echo "${pwd}/.venv/bin" >> $GITHUB_PATH
# printenv | sort
# repo: https://github.com/extractions/setup-just
# releases: https://github.com/extractions/setup-just/releases
- name: Install pinned version of just
uses: extractions/setup-just@53165ef7e734c5c07cb06b3c8e7b647c5aa16db3 # v4.0.0
with:
just-version: ${{ env.JUST_VERSION }}
# repo: https://github.com/astral-sh/setup-uv
# releases: https://github.com/astral-sh/setup-uv/tags
# docs: https://docs.astral.sh/uv/guides/integration/github
- name: Install pinned version of uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: ${{ matrix.python-version }}
version: ${{ env.UV_VERSION }}
enable-cache: true
cache-dependency-glob: "uv.lock"
prune-cache: true
- name: Remove global sitecustomize.py
# Ubuntu-only: unblocks our own sitecustomize entrypoint from the one preinstalled on
# the runner image. Nothing equivalent exists to remove on windows-latest.
if: runner.os == 'Linux'
run: just ubuntu-remove-global-sitecustomize
- name: Set up Python ${{ matrix.python-version }}
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: uv python install "${PYTHON_VERSION}"
# - name: Install the project
# run: uv sync --all-groups
- name: Install project + dependencies
env:
PYTHON_VERSION: ${{ matrix.python-version }}
run: |
just uv-set-python-version "${PYTHON_VERSION}"
just install
- name: Pre-commit
run: uv run pre-commit run --all-files
# - name: Bandit
# run: |
# just bandit-html
# https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts
# - name: Upload Bandit Report
# uses: actions/upload-artifact@v4
# with:
# name: Bandit Report
# path: var/html-bandit/index.html
# retention-days: 10