Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Translation Update 3.10 (#86) #1

Translation Update 3.10 (#86)

Translation Update 3.10 (#86) #1

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
checks:
strategy:
matrix:
tool:
- name: sphinx-lint
package: sphinx-lint
command: 'sphinx-lint --enable default-role --ignore .git'
- name: Line length
command: 'awk ''{if (length($0) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}'' $CHANGED_PO_FILES'
name: ${{ matrix.tool.name }} (${{ matrix.tool.package }})
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: lots0logs/[email protected]
id: changed_files
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install ${{ matrix.tool.package }}
run: |
if [ -n "${{ matrix.tool.apt_dependencies }}" ]; then
sudo apt-get update && sudo apt-get install -y ${{ matrix.tool.apt_dependencies }}
fi
if [ -n "${{ matrix.tool.package }}" ]; then
python -m pip install --upgrade pip setuptools wheel
python -m pip install ${{ matrix.tool.package }}
fi
- name: Run ${{ matrix.tool.package }}
env:
ADDED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.added), ' ') }}
MODIFIED_FILES: ${{ join(fromJSON(steps.changed_files.outputs.modified), ' ') }}
run: |
CHANGED_PO_FILES=$(printf "%s %s\n" "$ADDED_FILES" "$MODIFIED_FILES" | tr ' ' '\n' | grep '.po$'; true)
pwd
tree -L 2
if [ -n "$CHANGED_PO_FILES" ]
then
echo "Running on:" $CHANGED_PO_FILES
${{ matrix.tool.command }}
else
echo "No changed po files, nothing to check."
fi
sphinx:
name: 'Generate docs (sphinx)'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Prepare environment
run: |
pwd
tree -L 2
git clone https://github.com/python/cpython.git venv/cpython/
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements.txt -r venv/cpython/Doc/requirements.txt
- name: Make
run: make