Skip to content

Commit 77cf439

Browse files
authored
Merge branch '3.12' into notas-migracion
2 parents e120332 + a761633 commit 77cf439

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1023
-741
lines changed

.github/workflows/main.yml

+53-10
Original file line numberDiff line numberDiff line change
@@ -11,34 +11,77 @@ jobs:
1111
name: Test
1212
runs-on: ubuntu-22.04
1313
steps:
14+
# Obtención del código
1415
- uses: actions/checkout@v4
16+
with:
17+
submodules: 'true'
18+
# Necesario para que tj-actions/changed-files se ejecute
19+
# dentro de un tiempo adecuado
20+
fetch-depth: 2
21+
22+
# Instalación de dependencias
1523
- name: Preparar Python v3.12
1624
uses: actions/setup-python@v4
1725
with:
1826
python-version: "3.12"
1927
cache: "pip"
20-
- name: Sincronizar con CPython
28+
- name: Configura dpkg/apt para ejecutarse de manera eficiente
29+
uses: abbbi/github-actions-tune@v1
30+
- name: Deshabilita triggers de postgresql-common
31+
run: sudo sed -i '/postgresql-common/d' /var/lib/dpkg/triggers/File
32+
- name: Instalar dependencias de sistema
2133
run: |
22-
git submodule update --init --depth=1 cpython
23-
- name: Instalar dependencias
34+
sudo apt-get install -y hunspell hunspell-es gettext language-pack-es locales-all
35+
- name: Instalar dependencias de Python
2436
run: |
25-
sudo apt-get update
26-
sudo apt-get install -y hunspell hunspell-es gettext language-pack-es
2737
python -m pip install -r requirements.txt
38+
- name: Listar paquetes y versiones
39+
run: |
2840
pip list
2941
pospell --version
3042
powrap --version
43+
44+
# Cálculo de los archivos .po a verificar.
45+
# En el caso de un PR, sólo se chequean los .po que se están editando,
46+
# mientras que en caseo de un push a las ramas 3.* queremos revisar
47+
# todos los archivos
48+
- name: Obtiene la lista de archivos .po con cambios (sólo en PRs)
49+
if: github.event_name == 'pull_request'
50+
id: changed-po-files
51+
uses: tj-actions/changed-files@v40
52+
with:
53+
files: |
54+
**/*.po
55+
- name: Calcula lista de archivos .po a revisar
56+
id: po-files-to-check
57+
env:
58+
PO_FILES_TO_CHECK: ${{ steps.changed-po-files.conclusion == 'skipped' && '**/*.po' || steps.changed-po-files.outputs.all_changed_files }}
59+
run: |
60+
echo "po_files_to_check=$PO_FILES_TO_CHECK" >> $GITHUB_OUTPUT
61+
echo "any_po_files_to_check=`test -n \"$PO_FILES_TO_CHECK\" && echo true || echo false`" >> $GITHUB_OUTPUT
62+
- name: Muestra outputs de steps anteriores para debugueo
63+
env:
64+
CHANGED_PO_FILES: ${{ toJson(steps.changed-po-files) }}
65+
PO_FILES_TO_CHECK: ${{ toJson(steps.po-files-to-check) }}
66+
run: |
67+
echo "steps.changed-po-files=$PO_FILES_TO_CHECK"
68+
echo "steps.po-files-to-change.$CHANGED_PO_FILES"
69+
70+
# Chequeos a realizar
3171
- name: TRANSLATORS
3272
run: |
3373
diff -Naur TRANSLATORS <(LANG=es python scripts/sort.py < TRANSLATORS)
3474
- name: Powrap
35-
run: powrap --check --quiet **/*.po
75+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
76+
run: powrap --check --quiet ${{ steps.po-files-to-check.outputs.po_files_to_check }}
3677
- name: Sphinx lint
37-
run: |
38-
sphinx-lint */*.po
78+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
79+
run: sphinx-lint ${{ steps.po-files-to-check.outputs.po_files_to_check }}
3980
- name: Pospell
40-
run: |
41-
python scripts/check_spell.py
81+
if: steps.po-files-to-check.outputs.any_po_files_to_check == 'true'
82+
run: python scripts/check_spell.py ${{ steps.po-files-to-check.outputs.po_files_to_check }}
83+
84+
# Construcción de la documentación
4285
- name: Construir documentación
4386
run: |
4487
# FIXME: Relative paths for includes in 'cpython'

.github/workflows/pr-comment.yml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Agrega comentario a PR
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
pr-comment:
8+
name: Entradas sin traducción
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.event.pull_request.merge_commit_sha }}
14+
persist-credentials: false
15+
- name: Preparar Python v3.11
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: "3.11"
19+
cache: "pip"
20+
- name: Instalar dependencias
21+
run: |
22+
python -m pip install -r requirements.txt
23+
- name: Obtiene lista de archivos con cambios
24+
id: changed-files
25+
uses: tj-actions/changed-files@v40
26+
with:
27+
files: |
28+
**/*.po
29+
- name: Calcular entradas faltantes
30+
if: steps.changed-files.outputs.any_changed == 'true'
31+
id: create-pr-comment
32+
env:
33+
CHANGED_PO_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
34+
run: |
35+
{
36+
echo 'comment<<EOF'
37+
python scripts/list_missing_entries.py --github $CHANGED_PO_FILES
38+
echo EOF
39+
} >> "$GITHUB_OUTPUT"
40+
- name: Agregar comentario con entradas faltantes
41+
if: steps.changed-files.outputs.any_changed == 'true'
42+
uses: thollander/actions-comment-pull-request@v2
43+
with:
44+
message: ${{ steps.create-pr-comment.outputs.comment }}
45+
comment_tag: missing-entries
+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
monitorean
2+
monitorearse
3+
monitoreado
4+
monitoreen
5+
monitorean
6+
monitoreados
7+
stopiteration

0 commit comments

Comments
 (0)