1- # From python-docs-translations/transifex-automations
2- # Orignals: https://github.com/python-docs-translations/transifex-automations/tree/main/sample-workflows
1+ # Adapted from python-docs-translations/transifex-automations
2+ # Originals (reviewed at f7ac74cc364ac066273d13755e9943db13f49206):
3+ # https://github.com/python-docs-translations/transifex-automations/blob/main/sample-workflows/po-lint.yml
4+ # https://github.com/python-docs-translations/transifex-automations/blob/main/sample-workflows/test-build.yml
35name : Linting and Building Workflow
46
57on :
@@ -19,28 +21,38 @@ jobs:
1921 strategy :
2022 fail-fast : false
2123 matrix :
22- version : [ '3.14', '3.13' ]
24+ version : [ '3.15', '3. 14', '3.13' ]
2325 format : [ html ]
2426 steps :
25- - uses : actions/setup-python@master
27+ - name : Set up Python
28+ uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
2629 with :
27- python-version : 3.12 # pinned for Sphinx 3.4.3 to build 3.10
28- - uses : actions/checkout@master
30+ python-version : ${{ matrix.version }}
31+ allow-prereleases : true
32+ - name : Check out CPython
33+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2934 with :
3035 repository : python/cpython
3136 ref : ${{ matrix.version }}
32- - run : make venv
37+ persist-credentials : false
38+ - name : Install uv for CPython's locked documentation dependencies
39+ run : python -m pip install uv
40+ - name : Create documentation environment
41+ run : make venv PYTHON=python
3342 working-directory : ./Doc
34- - uses : actions/checkout@master
43+ - name : Check out translations
44+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3545 with :
36- ref : ${{ matrix.version }}
46+ # Check the triggering commit when it belongs to this version.
47+ ref : ${{ matrix.version == github.ref_name && github.sha || matrix.version }}
3748 path : Doc/locales/ja/LC_MESSAGES
38- - run : git pull
39- working-directory : ./Doc/locales/ja/LC_MESSAGES
40- - uses : sphinx-doc/github-problem-matcher@v1.1
41- - run : make -e SPHINXOPTS="--color -D language='ja' -W --keep-going" ${{ matrix.format }}
49+ persist-credentials : false
50+ - uses : sphinx-doc/github-problem-matcher@1f74d6599f4a5e89a20d3c99aab4e6a70f7bda0f # v1.1
51+ - name : Build Japanese documentation
52+ run : make -e SPHINXOPTS="--color -D language=ja -W --keep-going" ${{ matrix.format }}
4253 working-directory : ./Doc
43- - uses : actions/upload-artifact@master
54+ - name : Upload documentation
55+ uses : actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
4456 if : success() || failure()
4557 with :
4658 name : build-${{ matrix.version }}-${{ matrix.format }}
@@ -51,15 +63,20 @@ jobs:
5163 strategy :
5264 fail-fast : false
5365 matrix :
54- version : [ '3.14', '3.13' ]
66+ version : [ '3.15', '3. 14', '3.13' ]
5567 continue-on-error : true
5668 steps :
57- - uses : actions/setup-python@master
69+ - name : Set up Python
70+ uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5871 with :
59- python-version : 3
60- - run : pip install sphinx-lint
61- - uses : actions/checkout@master
72+ python-version : ${{ matrix.version }}
73+ allow-prereleases : true
74+ - name : Install sphinx-lint
75+ run : python -m pip install sphinx-lint
76+ - name : Check out translations
77+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6278 with :
63- ref : ${{ matrix.version }}
64- - uses : rffontenelle/sphinx-lint-problem-matcher@v1.0.0
79+ ref : ${{ matrix.version == github.ref_name && github.sha || matrix.version }}
80+ persist-credentials : false
81+ - uses : rffontenelle/sphinx-lint-problem-matcher@4270bf50b2c93640a7cbb231c09f8e694699af9f # v1.0.0
6582 - run : sphinx-lint
0 commit comments