Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build

on:
push:
branches:
- "**"
pull_request:

jobs:
test:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set Up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Get CPython
run: |
git clone https://github.com/python/cpython.git ../cpython --branch=3.10

- name: Install dependencies
run: |
sudo apt update
sudo apt install -y gettext
python -m pip install -r requirements.txt
python -m pip install -r ../cpython/Doc/requirements.txt

- name: Sphinx lint
run: |
sphinx-lint *.po */*.po

- name: Build docs
run: |
PYTHONWARNINGS=ignore::FutureWarning,ignore::RuntimeWarning sphinx-build -j auto -W --keep-going -b html -d ../cpython/Doc/_build/doctree -D language=tr . ../cpython/Doc/_build/html
16 changes: 0 additions & 16 deletions .github/workflows/get-changes.py

This file was deleted.

24 changes: 9 additions & 15 deletions .github/workflows/wrap_branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,16 @@ on: workflow_dispatch
jobs:
wrap:
runs-on: ubuntu-latest

strategy:
matrix:
# Run in all these versions of Python
python-version: ["3.10"]

steps:
# Checkout the latest code from the repo
- name: Checkout repo
uses: actions/checkout@v3

# Setup which version of Python to use
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set Up Python 3.10
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

# Display the Python version being used
- name: Display Python version
run: python -c "import sys; print(sys.version)"
python-version: "3.10"

# Update pip
- name: Update pip
Expand All @@ -36,11 +26,15 @@ jobs:

# Install dependencies
- name: Install dependencies
run: sudo apt install gettext
run: sudo apt install -y gettext

# Wrap all po files
- name: Wrap
run: powrap *.po **/*.po
run: powrap *.po */*.po

- name: Sphinx lint
run: |
sphinx-lint *.po */*.po

# Detect changed files
- name: Detect changed files
Expand Down
95 changes: 0 additions & 95 deletions .github/workflows/wrap_pr.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ __pycache__/
.DS_Store
*.pot
*.po.bak
locales/
9 changes: 9 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repos:
- repo: local
hooks:
- id: lint
name: Run sphinx linting
entry: sphinx-lint
language: python
additional_dependencies: ['sphinx-lint==0.6.7']
files: \.po$
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ sphinx==4.5.0
blurb
sphinx-lint==0.6.7
python-docs-theme>=2022.1
pre-commit