Repository navigation
59 lines (52 loc) · 1.74 KB
/
Copy pathpython-version-consistency.yml
File metadata and controls
59 lines (52 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Python Version Consistency Check
permissions:
contents: read
on:
push:
paths:
- 'pyproject.toml'
- '**/pyproject.toml'
- 'Cargo.toml'
- 'crates/**/Cargo.toml'
- 'python/**/Cargo.toml'
- 'exp/**/Cargo.toml'
- '.github/workflows/python-release.yml'
- 'scripts/check_python_workspace.py'
- '.github/workflows/python-version-consistency.yml'
pull_request:
paths:
- 'pyproject.toml'
- '**/pyproject.toml'
- 'Cargo.toml'
- 'crates/**/Cargo.toml'
- 'python/**/Cargo.toml'
- 'exp/**/Cargo.toml'
- '.github/workflows/python-release.yml'
- 'scripts/check_python_workspace.py'
- '.github/workflows/python-version-consistency.yml'
workflow_dispatch:
jobs:
check_python_workspace:
runs-on: ubuntu-latest
steps:
- name: Harden the runner (egress audit)
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
with:
egress-policy: audit
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: "3.12"
- name: Set up uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version-file: ".github/uv.toml"
# Nothing here benefits from a uv cache; the default (auto) would save
# a PR-scoped cache on every pull request.
enable-cache: false
- name: Check Python workspace metadata
run: uv run --frozen python scripts/check_python_workspace.py