Repository navigation
50 lines (45 loc) · 1.85 KB
/
Copy pathpythonpackage.yml
File metadata and controls
50 lines (45 loc) · 1.85 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
name: Python package
on: [pull_request]
jobs:
python-check:
runs-on: ubuntu-latest
strategy:
max-parallel: 3
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip poetry
poetry --version
poetry install
- name: Install ruff
run: python -m pip install ruff==0.16.9
# Scope is explicit rather than `.` so the docstring baseline in
# pyproject.toml covers exactly these paths, and so generated or vendored
# trees cannot silently widen what CI lints. `test/` is included because
# the per-file-ignores baseline lists tiers for it; without it those tiers
# are dead configuration.
- name: Run tests and linters
run: |
poetry run ruff check photoshop test scripts
poetry run ruff format --check photoshop test scripts
# llms.txt and llms-full.txt are generated. The Release workflow opens a
# pull request when they drift, but that only reports — this is what makes
# a stale file fail the build.
#
# The check ignores the `Version:` line on both sides. That line is the
# newest git tag, so it changes as soon as a release lands, while the
# committed file still carries the previous release; counting it as drift
# would turn main and every PR red until the bot's docs PR is merged by
# hand. Version lag is converged by that bot PR instead. Everything else in
# the two files still fails here.
- name: Check generated llms files are current
run: python scripts/generate_llms.py --check