Allow to declare class name outside current NS #611
Workflow file for this run
This file contains 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
name: CI | |
on: | |
pull_request: | |
push: | |
schedule: | |
- cron: '0 0/2 * * *' | |
jobs: | |
build: | |
if: endsWith(github.head_ref || github.ref_name, '.changes') == false | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- 'latest' # hardcoded below as '3.11' | |
- 'beta' # hardcoded below as '3.12' | |
fail-fast: false | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python == 'latest' && '3.11' || (matrix.python == 'beta' && '3.12' || matrix.python) }} | |
allow-prereleases: true | |
- name: Install tools | |
run: | | |
sudo apt -y install libxml2-utils | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install -r test/requirements.txt | |
pip install . | |
- name: Build Unit Tests | |
run: | | |
cd test | |
find . -name '*.html' -exec rm {} \; | |
sed -i 's~, "logging\.md"~~' conf.py | |
make html SPHINXOPTS='' 2>&1 | tee baseline.txt | |
git restore conf.py | |
(cd _build/html && rm genindex.html index.html search.html php-modindex.html) | |
(cd _build/html && find . -name '*.html' -exec sh -c 'xmllint {} --xpath '"'"'//div[@role="main"]'"'"' | xmllint --format - > ../../{}' \;) | |
sed -i -r 's~[^:]*/(test/)~\1~;t;d' baseline.txt | |
- name: Apply Coding Style | |
if: matrix.python == 'latest' | |
run: | | |
pip install black | |
python -m black . | |
- name: Diff Unit Tests Output and Coding Style | |
if: matrix.python == 'latest' | |
run: | | |
cd test | |
rm -r _build | |
git add . -N && git diff --exit-code | |
- name: Push Unit Tests Output | |
if: failure() && github.repository_owner != 'markstory' && matrix.python == 'latest' | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
branch: ${{ github.head_ref || github.ref_name }}.changes | |
create_branch: true | |
push_options: '--force' | |
commit_message: Unit Tests Changes | |
commit_user_name: Bot | |
commit_user_email: [email protected] | |
commit_author: Bot <[email protected]> | |
- name: Build Unit Tests with '-W' option | |
run: | | |
cd test | |
make html SPHINXOPTS='-W' | |
sed -i 's~, "logging\.md"~~' conf.py | |
! make html SPHINXOPTS='-W' || (echo 'Unexpected zero exit code'; false) | |
git restore conf.py | |
- name: Build Unit Tests with toc show_parents=hide | |
run: | | |
cd test | |
make html SPHINXOPTS='-W -D toc_object_entries_show_parents=hide' | |
- name: Build Unit Tests with toc show_parents=domain | |
run: | | |
cd test | |
make html SPHINXOPTS='-W -D toc_object_entries_show_parents=domain' | |
- name: Build Unit Tests with toc show_parents=all | |
run: | | |
cd test | |
make html SPHINXOPTS='-W -D toc_object_entries_show_parents=all' |