CI Tests - Docs #517
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
| # These access secrets, so should only be run on local branches. | |
| name: CI Tests - Docs | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| inputs: | |
| commit_id: | |
| description: 'Branch or Commit ID (optional)' | |
| required: false | |
| type: string | |
| schedule: | |
| # * is a special character in YAML so we quote this string | |
| # Run at 07:00 UTC every day | |
| - cron: '00 07 * * *' | |
| jobs: | |
| check_ReadMe: | |
| runs-on: Large_Linux | |
| environment: test | |
| strategy: | |
| fail-fast: false # Don't cancel all on first failure | |
| matrix: | |
| python-version: ["3.10", "3.14"] | |
| steps: | |
| - name: Checkout repo at ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }} | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event_name == 'workflow_dispatch' && inputs.commit_id || github.sha }} | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Set up uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| - name: Install guidance | |
| run: | | |
| uv pip install --system --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu -e .[all,test] | |
| - name: Extract Python code | |
| run: python ./scripts/extract_python_from_readme.py --input_file ./README.md --output_file ./readme.py | |
| - name: Run extracted Python | |
| run: python ./readme.py |