🐛 fix(ci): ogni workflow condiviso ha un timeout, sul job e sui passi di rete

- timeout-minutes sul job di tutti e 16 i workflow riusabili: 10 per branch-cleanup,
  15-20 per release e manutenzione, 30 per i quality gates e le pubblicazioni,
  45 per le immagini Docker, 60 per la build Android
- timeout-minutes su 95 passi che dipendono dalla rete (checkout, setup-*, cache,
  install, audit, login, push, upload): con il solo timeout sul job il log non dice
  quale passo si è impiantato, con questi sì
- valori letterali e non input: su un job che chiama un workflow riusabile
  timeout-minutes non è una chiave ammessa, quindi il limite può stare solo qui,
  e i valori scelti sono già ampi rispetto alla durata reale dei job

Fixes #23 @1h30m
This commit is contained in:
LucaZanni committed 2026-10-20 22:33:53 +02:00
1 parent ddf60dcd2b
commit 3d28471b2c
16 files changed
+143

No files matched your search

@@ -43,6 +43,9 @@ on:
jobs:
python-package-release:
runs-on: ubuntu-latest
# Il chiamante non puo' dichiararlo: su un job che usa un workflow
# riusabile timeout-minutes non e' una chiave ammessa (devops/shared-actions#23).
timeout-minutes: 30
defaults:
run:
working-directory: ${{ inputs.working-directory }}
@@ -52,9 +55,11 @@ jobs:
PACKAGES_API_URL: https://gitea.pzetatouch.it/api/v1/packages/PZeta_Touch/pypi
steps:
- name: Checkout
timeout-minutes: 10
uses: https://gitea.pzetatouch.it/actions/checkout@v7
- name: Setup Python
timeout-minutes: 10
uses: https://gitea.pzetatouch.it/actions/setup-python@v7
with:
python-version: ${{ inputs.python-version || '3.11' }}
@@ -102,6 +107,7 @@ jobs:
# messaggio esplicito che con il 409 di twine a fine job. Qualsiasi risposta diversa
# da 200/404 (token scaduto, registry giù) blocca: non si pubblica alla cieca.
- name: Verifica che la versione non sia già pubblicata
timeout-minutes: 5
env:
NAME: ${{ steps.meta.outputs.name }}
VERSION: ${{ steps.meta.outputs.version }}
@@ -125,6 +131,7 @@ jobs:
esac
- name: Cache pip
timeout-minutes: 10
uses: https://gitea.pzetatouch.it/actions/cache@v6
with:
path: ~/.cache/pip
@@ -137,6 +144,7 @@ jobs:
# il controllo dell'installazione tramite requirements-dev.txt (es. per forzare le
# wheel CPU di torch con --extra-index-url, non esprimibile in pyproject.toml).
- name: Install dependencies
timeout-minutes: 15
run: |
python -m pip install --upgrade pip
if [ -n "${{ inputs.install-extras }}" ]; then
@@ -160,11 +168,13 @@ jobs:
run: mypy .
- name: Test (pytest)
timeout-minutes: 20
run: pytest --tb=short -q
# Build isolata (PEP 517): il backend dichiarato in [build-system] viene installato in
# un ambiente temporaneo, quindi l'artefatto non dipende da cosa c'è nel venv del job.
- name: Build (wheel + sdist)
timeout-minutes: 10
run: |
rm -rf dist
python -m build
@@ -174,6 +184,7 @@ jobs:
run: twine check --strict dist/*
- name: Publish sul registry PyPI di Gitea
timeout-minutes: 10
env:
TWINE_REPOSITORY_URL: ${{ env.PYPI_UPLOAD_URL }}
TWINE_USERNAME: ${{ secrets.G_USER }}