Repository navigation
fix(math): remove extra backtick in ValueError role #927
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
| name: Tests | |
| on: [push, pull_request, workflow_dispatch] | |
| jobs: | |
| checks: | |
| # Using matrix-tool strategy in case we want to add more tools in the future | |
| strategy: | |
| matrix: | |
| tool: | |
| - name: sphinx-lint | |
| package: sphinx-lint | |
| command: "sphinx-lint --enable default-role --ignore .git" | |
| name: ${{ matrix.tool.name }} (${{ matrix.tool.package }}) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: lots0logs/gh-action-get-changed-files@2.2.2 | |
| id: changed_files | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - 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 | |
| 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@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Prepare environment | |
| run: | | |
| pwd | |
| tree -L 2 | |
| git clone https://github.com/python/cpython.git venv/cpython/ | |
| # Install the doc requirements of the commit `make` builds, not of main. | |
| git -C venv/cpython checkout "$(sed -n 's/^CPYTHON_CURRENT_COMMIT := //p' Makefile)" | |
| pip install -r venv/cpython/Doc/requirements.txt | |
| # blurb 2.x rejects a malformed entry in the pinned commit's Misc/NEWS.d. | |
| pip install "blurb<2" | |
| - name: Make | |
| run: make |