Upload unique dev packages to test.pypi.org #114
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: Test docs | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
release: | |
# Cancel running jobs for the same workflow and branch. | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# IMPORTANT: Any new jobs need to be added to the check-docs-passed job to ensure they correctly gate code changes | |
jobs: | |
# Test building the docs (html, linkcheck, doctest, coverage) | |
test-docs: | |
runs-on: ubuntu-latest-4-cores | |
strategy: | |
fail-fast: false | |
matrix: | |
tox_env: [docs, doctests] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 # The node version needs to stay in sync with .readthedocs.yml | |
- run: npm install -g @mermaid-js/mermaid-cli | |
- run: sudo apt install --no-install-recommends --assume-yes graphviz | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' # This needs to stay in sync with .readthedocs.yml and pyproject.toml | |
- name: Install tox | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox | |
- name: Test | |
run: tox -ve ${{ matrix.tox_env }} | |
- uses: thedoctor0/[email protected] | |
if: '!cancelled()' | |
with: | |
type: zip | |
filename: ${{ matrix.tox_env }}_results.zip | |
path: .results_${{ matrix.tox_env }}/ | |
- uses: actions/upload-artifact@v3 | |
if: '!cancelled()' | |
with: | |
name: artifact_${{ matrix.tox_env }} | |
path: ${{ matrix.tox_env }}_results.zip | |
# Check that all jobs passed | |
check-docs-passed: | |
if: always() | |
needs: [test-docs] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |