Add Furo styling to qiskit-call-to-action-item
#710
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
- '1.*' | |
pull_request: | |
jobs: | |
docs: | |
name: Sample Docs Build | |
runs-on: ubuntu-latest | |
if: github.repository_owner == 'Qiskit' | |
container: | |
# Keep in sync with tests/js/Dockerfile's base image. | |
image: mcr.microsoft.com/playwright:v1.34.0-jammy | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fix permissions for sphinx-theme-builder | |
run: chown -R $(id -u):$(id -g) . | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Install Node.js dependencies | |
run: npm ci | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install Ubuntu deps | |
run: apt-get update && apt-get install -y pandoc graphviz | |
- name: Install tox | |
run: python -m pip install -U tox | |
- name: Run lint | |
run: tox run -e lint | |
- name: Run Pytest | |
run: tox run -e py | |
# For some reason, the Jupyter Extension fails to build properly if one theme has already | |
# been built with a custom BUILD_DIR. So, we eagerly upload the artifacts for each theme | |
# build, and then delete the BUILD_DIR before proceeding to the next theme. | |
# | |
# But, we build Furo with the default BUILD_DIR because our JavaScript Snapshot tests start | |
# the server at that standard location. | |
- name: Create artifacts/ folder | |
run: mkdir artifacts | |
- name: Build Legacy theme | |
run: | | |
THEME=qiskit_sphinx_theme BUILD_DIR=example_docs/_build_legacy/html tox run -e docs | |
tar -zcvf legacy_html_docs.tar.gz example_docs/_build_legacy/html | |
mv legacy_html_docs.tar.gz artifacts/. | |
rm -rf example_docs/_build_legacy | |
- name: Build Furo theme | |
run: | | |
THEME=_qiskit_furo tox run -e docs | |
tar -zcvf furo_html_docs.tar.gz example_docs/docs/_build/html | |
mv furo_html_docs.tar.gz artifacts/. | |
- name: Upload Sphinx builds | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: html_docs | |
path: artifacts | |
- name: Run JavaScript and snapshot tests | |
run: npm run _run-snapshot-tests | |
- name: Upload snapshot results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: snapshot_results | |
path: snapshot_results/ |