FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add linting/test building workflow by StanFromIreland · Pull Request #392 · python/python-docs-zh-cn · GitHub

Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .yml  (1) All 1 file type selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
80 changes: 80 additions & 0 deletions .github/workflows/test-translation.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# From: python-docs-translations/transifex-automations Sample Workflows
# For more information, see: https://python-docs-transifex-automation.readthedocs.io/workflows.html
name: Lint and test build
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- '*'
workflow_dispatch:
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ '3.14', '3.13', '3.12', '3.11', '3.10' ]
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/sphinx-lint-problem-matcher@v1.0.0
- run: sphinx-lint

build-translation:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version: [ '3.14', '3.13', '3.12', '3.11', '3.10' ]
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/zh_CN/LC_MESSAGES
- run: git pull
working-directory: ./Doc/locales/zh_CN/LC_MESSAGES
- uses: sphinx-doc/github-problem-matcher@v1.1
- run: make -e SPHINXOPTS="--color -D language='zh_CN' -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.14', '3.13', '3.12', '3.11', '3.10' ]
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: .
Loading

Back | FazBrowse Home | New Git URL