| 1 |
--- |
| 2 |
name: Test documentation |
| 3 |
|
| 4 |
env: |
| 5 |
CI_FORCE_COLORS_SPHINX: --color |
| 6 |
|
| 7 |
on: |
| 8 |
workflow_dispatch: |
| 9 |
|
| 10 |
push: |
| 11 |
tags: |
| 12 |
- "!*" |
| 13 |
branches: |
| 14 |
- main |
| 15 |
- "test-me-*" |
| 16 |
|
| 17 |
pull_request: |
| 18 |
branches: |
| 19 |
- "**" |
| 20 |
|
| 21 |
jobs: |
| 22 |
build: |
| 23 |
name: Tests on ${{ matrix.os }} with default python |
| 24 |
runs-on: ${{ matrix.os }} |
| 25 |
strategy: |
| 26 |
fail-fast: false |
| 27 |
matrix: |
| 28 |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] |
| 29 |
steps: |
| 30 |
- uses: actions/checkout@v3 |
| 31 |
with: |
| 32 |
fetch-depth: 0 |
| 33 |
|
| 34 |
- name: Set up Python |
| 35 |
uses: actions/setup-python@v4 |
| 36 |
with: |
| 37 |
python-version: "3.11" |
| 38 |
|
| 39 |
- name: Display Python version |
| 40 |
run: python --version |
| 41 |
|
| 42 |
- name: Upgrade pip |
| 43 |
run: python -m pip install --upgrade pip |
| 44 |
|
| 45 |
- name: Install pipx |
| 46 |
run: python -m pip install --upgrade pipx |
| 47 |
|
| 48 |
- name: Install tox via pipx |
| 49 |
run: pipx install tox |
| 50 |
|
| 51 |
- name: Run tests with tox except linkcheck and spelling |
| 52 |
if: runner.os != 'Linux' |
| 53 |
run: tox -m docs |
| 54 |
|
| 55 |
- name: Run all tests with tox |
| 56 |
if: runner.os == 'Linux' |
| 57 |
run: tox -m docs-full |