Skip to content

pip: bump requests from 2.31.0 to 2.32.0 (#210) #345

pip: bump requests from 2.31.0 to 2.32.0 (#210)

pip: bump requests from 2.31.0 to 2.32.0 (#210) #345

Workflow file for this run

# Run some tests in the Python Doc translations
name: Check
on:
workflow_dispatch:
workflow_call:
pull_request:
branches:
- '3.13'
paths:
- '.github/workflows/check.yml'
- '.github/scripts/prepmsg.sh'
- '.github/scripts/list-obsolete.py'
- 'Makefile'
- 'requirements.txt'
- '*.po'
- '**/*.po'
push:
branches:
- '3.13'
paths:
- '.github/workflows/check.yml'
- '.github/scripts/prepmsg.sh'
- '.github/scripts/list-obsolete.py'
- 'Makefile'
- 'requirements.txt'
- '*.po'
- '**/*.po'
permissions:
contents: read
jobs:
# Build documentation handling warnings as errors. Always store logs.
# If success, make built docs artifact. If failure, notify telegram.
build:
name: Build translated docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 5
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: '3'
- name: Make sure the repository is up to date
if: github.event_name != 'pull_request'
run: git pull --rebase
- name: Add problem matcher
uses: sphinx-doc/github-problem-matcher@v1.1
- name: Build docs
continue-on-error: true
id: build
run: |
make build
- name: Upload artifact - docs
if: steps.build.outcome == 'success'
uses: actions/upload-artifact@v4.3.3
with:
name: docs
path: cpython/Doc/build/html
- name: Upload artifact - log files
if: always()
uses: actions/upload-artifact@v4.3.3
with:
name: build-logs
path: logs/*
- name: Prepare notification (only on error)
if: steps.build.outcome == 'failure'
id: prepare
run: .github/scripts/prepmsg.sh logs/build/err*.txt logs/notify.txt
env:
GITHUB_JOB: ${{ github.job }}
GITHUB_RUN_ID: ${{ github.run_id }}
GITHUB_REPOSITORY: ${{ github.repository }}
- name: Notify via Telegram
if: steps.prepare.outcome == 'success'
uses: appleboy/telegram-action@v0.1.1
with:
to: ${{ secrets.TELEGRAM_TO }}
token: ${{ secrets.TELEGRAM_TOKEN }}
format: markdown
disable_web_page_preview: true
message_file: logs/notify.txt
# Run sphinx-lint to find wrong reST syntax in PO files. Always store logs.
lint:
name: Lint translations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 5
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: '3'
- name: Make sure the repository is up to date
if: github.event_name != 'pull_request'
run: git pull --rebase
- name: Add problem matcher
uses: rffontenelle/sphinx-lint-problem-matcher@v1.0.0
- name: Run sphinx-lint
continue-on-error: true
id: lint
run: |
make lint
- name: Upload artifact - log files
uses: actions/upload-artifact@v4.3.3
with:
name: lint-logs
path: logs/*
#- name: Prepare notification (only on error)
# if: step.lint.outcome == 'failure'
# id: prepare
# run: scripts/prepmsg.sh logs/build/err*.txt logs/notify.txt
# env:
# GITHUB_JOB: ${{ github.job }}
# GITHUB_RUN_ID: ${{ github.run_id }}
# GITHUB_REPOSITORY: ${{ github.repository }}
#
#- name: Notify via Telegram
# if: step.prepare.outcome == 'success'
# uses: appleboy/telegram-action@v0.1.1
# with:
# to: ${{ secrets.TELEGRAM_TO }}
# token: ${{ secrets.TELEGRAM_TOKEN }}
# format: markdown
# disable_web_page_preview: true
# message_file: logs/notify.txt
# Spell check the PO files, and store them in logs/ directory
pospell:
name: Spell check translations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.6
with:
fetch-depth: 5
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: '3'
- name: Make sure the repository is up to date
if: github.event_name != 'pull_request'
run: git pull --rebase
- name: Install Hunspell
run: sudo apt install hunspell hunspell-pt-br -y
- name: Run pospell
continue-on-error: true
id: pospell
run: make spell
- name: Upload artifact - log files
uses: actions/upload-artifact@v4.3.3
with:
name: pospell-logs
path: logs/*
# Gather all strings in a single PO file, useful for Translation Memory
# Also run powrap, useful only for pull_request testing for dependabot
compendium:
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.repository }}
uses: actions/checkout@v4.1.6
with:
fetch-depth: 5
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: '3'
- name: Make sure the repository is up to date
if: github.event_name != 'pull_request'
run: git pull --rebase
- name: Install dependencies
run: |
sudo apt update -y && sudo apt install gettext -y
pip3 install --upgrade pip
pip3 install -r requirements.txt
- name: Generate compendium from PO files
run: |
pocompendium --correct compendium.po *.po **/*.po
powrap compendium.po
- name: Upload artifact
uses: actions/upload-artifact@v4.3.3
with:
name: compendium
path: compendium.po
# List PO files that no longer have a corresponding page in Python docs
list-obsolete:
runs-on: ubuntu-latest
steps:
- name: Check out ${{ github.repository }}
uses: actions/checkout@v4.1.6
- name: Set up Python 3
uses: actions/setup-python@v5.1.0
with:
python-version: '3'
- name: Generate POT files
run: make pot
- name: List obsolete PO files, if any
run: python3 .github/scripts/list-obsolete.py