mirror of
https://github.com/python-kasa/python-kasa.git
synced 2026-11-22 05:53:33 +00:00
Some checks failed
CI / Perform Lint Checks (3.15) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.15 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.15 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
CI / Python 3.15 on windows-latest (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled
verify-lockfile / verify (push) Has been cancelled
GitHub introduced recently a way [to pin down dependencies using lock files](https://docs.github.com/en/actions/how-tos/secure-your-work/lock-workflow-dependencies), which also locks transitive dependencies.
44 lines
1.3 KiB
YAML
44 lines
1.3 KiB
YAML
---
|
|
name: Setup Environment
|
|
description: Install uv, configure the system python, and the package dependencies
|
|
inputs:
|
|
uv-install-options:
|
|
default: ""
|
|
python-version:
|
|
required: true
|
|
cache-pre-commit:
|
|
default: false
|
|
cache-version:
|
|
default: "v0.1"
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Setup uv
|
|
id: setup-uv
|
|
uses: astral-sh/setup-uv@v10.3.2
|
|
with:
|
|
enable-cache: true
|
|
version-file: uv.lock
|
|
python-version: ${{ inputs.python-version }}
|
|
|
|
- name: Install Project Dependencies
|
|
id: install-project-dependencies
|
|
shell: bash
|
|
run: |
|
|
uv sync ${{ inputs.uv-install-options }}
|
|
|
|
- name: Read pre-commit Version
|
|
id: pre-commit-version
|
|
if: inputs.cache-pre-commit == 'true'
|
|
shell: bash
|
|
run: >-
|
|
echo "pre-commit-version=$(uv run pre-commit -V | awk '{print $2}')" >> $GITHUB_OUTPUT
|
|
|
|
- name: pre-commit Cache
|
|
id: pre-commit-cache
|
|
if: inputs.cache-pre-commit == 'true'
|
|
uses: actions/cache@v6.1.0
|
|
with:
|
|
path: ~/.cache/pre-commit/
|
|
key: cache-${{ inputs.cache-version }}-${{ runner.os }}-${{ runner.arch }}-pre-commit-${{ steps.pre-commit-version.outputs.pre-commit-version }}-python-${{ inputs.python-version }}-${{ steps.setup-uv.outputs.python-version }}-${{ hashFiles('.pre-commit-config.yaml') }}
|