Skip to content

Commit

Permalink
CI: use extra Action for testing documentation (#139)
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw authored Jul 26, 2023
1 parent b92af96 commit fe196a8
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 9 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, dev ]
pull_request:
branches: [ main, dev ]

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
11 changes: 2 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, windows-latest, macOS-latest ]
os: [ ubuntu-latest, windows-latest, macOS-latest ]
python-version: [ '3.8' ]
include:
- os: ubuntu-latest
Expand All @@ -33,7 +33,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,10 +47,4 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
if: matrix.os == 'ubuntu-20.04'

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

0 comments on commit fe196a8

Please sign in to comment.