π§ Accept ubCode-only directive options and refresh the docs ubCode config #2311
Workflow file for this run
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: Cypress E2E tests for Sphinx Needs | |
| on: [pull_request] | |
| jobs: | |
| js_tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set Up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| # the docs extra requires python>=3.11 (sphinx-syntax-example) | |
| python-version: "3.12" | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 18 | |
| - uses: actions/checkout@v4 | |
| - name: Update pip | |
| run: | | |
| pip install -U wheel | |
| pip install -U setuptools | |
| python -m pip install -U pip | |
| - name: Get pip cache dir | |
| id: pip-cache | |
| run: | | |
| echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT | |
| - name: Pip cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.pip-cache.outputs.dir }} | |
| key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install package | |
| run: | | |
| pip install -e .[docs] | |
| - name: Install Node dependencies | |
| run: npm install cypress | |
| - name: Build Docs | |
| id: sphinx-build-docs | |
| run: sphinx-build -a -T -E -j 4 -b html -d /tmp/sphinx_build/doctrees ./docs /tmp/sphinx_build/html | |
| - name: E2E Cypress Test on Chrome | |
| uses: cypress-io/github-action@v6 | |
| with: | |
| browser: chrome | |
| config-file: tests/js_test/cypress.config.js | |
| start: npm start | |
| # quote the url to be safe against YML parsing surprises | |
| wait-on: 'http://localhost:8080' | |