|
23 | 23 |
|
24 | 24 | - uses: astral-sh/setup-uv@v5 |
25 | 25 | with: |
| 26 | + version: "0.11.16" |
26 | 27 | enable-cache: true |
27 | 28 | cache-dependency-glob: software/uv.lock |
28 | 29 |
|
|
36 | 37 | run: uv run ruff format --check |
37 | 38 |
|
38 | 39 | - name: Run pytest |
39 | | - run: uv run pytest |
| 40 | + # Exclude @slow (the perf benchmark) from the gate — it asserts a |
| 41 | + # wall-clock budget that flakes on shared runners. Run it explicitly |
| 42 | + # with `uv run pytest -m slow`. |
| 43 | + run: uv run pytest -m "not slow" |
| 44 | + |
| 45 | + requirements-sync: |
| 46 | + # src/requirements.txt is generated from pyproject.toml (the single source of |
| 47 | + # truth) and is what pl-pkg builds from. This job fails if the committed file |
| 48 | + # has drifted from pyproject — e.g. someone changed a dependency but forgot to |
| 49 | + # regenerate. Fix locally with `pnpm deps:export` (see software/package.json). |
| 50 | + if: github.repository != 'milaboratory/platforma-sequence-properties' |
| 51 | + runs-on: ubuntu-latest |
| 52 | + defaults: |
| 53 | + run: |
| 54 | + working-directory: software |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + |
| 58 | + - uses: astral-sh/setup-uv@v5 |
| 59 | + with: |
| 60 | + version: "0.11.16" |
| 61 | + enable-cache: true |
| 62 | + cache-dependency-glob: software/uv.lock |
| 63 | + |
| 64 | + - name: Regenerate requirements.txt from pyproject.toml |
| 65 | + # Same script `pnpm deps:export` runs locally — single source of truth. |
| 66 | + run: bash scripts/deps-export.sh |
| 67 | + |
| 68 | + - name: Verify requirements.txt is in sync with pyproject.toml |
| 69 | + run: | |
| 70 | + if ! git diff --exit-code -- src/requirements.txt; then |
| 71 | + echo "" |
| 72 | + echo "::error::src/requirements.txt is out of sync with pyproject.toml" |
| 73 | + echo "Dependencies are defined in software/pyproject.toml; src/requirements.txt is generated." |
| 74 | + echo "Resolve locally with:" |
| 75 | + echo " cd software && pnpm deps:export" |
| 76 | + echo "then commit the updated src/requirements.txt." |
| 77 | + exit 1 |
| 78 | + fi |
| 79 | + echo "src/requirements.txt is in sync with pyproject.toml." |
0 commit comments