Skip to content

Commit

Permalink
CI: use separate Action for testing docs (#118)
Browse files Browse the repository at this point in the history
* CI: use separate Action for testing docs

* Disable link check
  • Loading branch information
hagenw authored Jul 13, 2023
1 parent 9b01209 commit faa4b0b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 14 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Documentation

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:

runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.8' ]

steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install package
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install docs requirements
run: pip install -r docs/requirements.txt

- name: Test building documentation
run: python -m sphinx docs/ docs/_build/ -b html -W

# - name: Check links in documentation
# - run: python -m sphinx docs/ docs/_build/ -b linkcheck -W
15 changes: 1 addition & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
python-version: [ '3.8' ]
include:
- os: ubuntu-latest
python-version: '3.9'
- os: ubuntu-latest
python-version: '3.10'
- os: ubuntu-latest
python-version: '3.11'
python-version: [ '3.8', '3.9', '3.10', '3.11' ]

steps:
- uses: actions/checkout@v3
Expand All @@ -35,7 +28,6 @@ jobs:
python -V
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r docs/requirements.txt
pip install -r tests/requirements.txt
- name: Test with pytest
Expand All @@ -48,8 +40,3 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
if: matrix.os == 'ubuntu-latest'

- name: Test building documentation
run: |
python -m sphinx docs/ docs/_build/ -b html -W
if: matrix.os == 'ubuntu-latest'

0 comments on commit faa4b0b

Please sign in to comment.