Skip to content

Test translation workflow #49

Test translation workflow

Test translation workflow #49

# python-docs-translations sample workflows, adapted to be contained in a single file
# For more information, see https://python-docs-transifex-automation.readthedocs.io/workflows.html
name: Test translation workflow
on:
schedule:
- cron: '0 12 * * *'
push:
branches:
- '*'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ 3.13 ]
continue-on-error: true
steps:
- uses: actions/setup-python@master
with:
python-version: 3
- run: pip install sphinx-lint
- uses: actions/checkout@master
with:
ref: ${{ matrix.version }}
- uses: rffontenelle/[email protected]
- run: sphinx-lint
build-translation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ 3.13 ]
format: [ html, latex ]
steps:
- uses: actions/setup-python@master
with:
python-version: 3.12 # pinned for Sphinx 3.4.3 to build 3.10
- uses: actions/checkout@master
with:
repository: python/cpython
ref: ${{ matrix.version }}
- run: make venv
working-directory: ./Doc
- uses: actions/checkout@master
with:
ref: ${{ matrix.version }}
path: Doc/locales/ro/LC_MESSAGES
- run: git pull
working-directory: ./Doc/locales/ro/LC_MESSAGES
- uses: sphinx-doc/[email protected]
- run: make -e SPHINXOPTS="--color -D language='ro' -W --keep-going" ${{ matrix.format }}
working-directory: ./Doc
- uses: actions/upload-artifact@master
if: success() || failure()
with:
name: build-${{ matrix.version }}-${{ matrix.format }}
path: Doc/build/${{ matrix.format }}
output-pdf:
runs-on: ubuntu-latest
strategy:
matrix:
version: [ 3.13 ]
needs: [ 'build-translation' ]
steps:
- uses: actions/download-artifact@master
with:
name: build-${{ matrix.version }}-latex
- run: sudo apt-get update
- run: sudo apt-get install -y latexmk texlive-xetex fonts-freefont-otf xindy
- run: make
- uses: actions/upload-artifact@master
with:
name: build-${{ matrix.version }}-pdf
path: .