Skip to content

Commit

Permalink
CI: use extra Action for testing documentation (#44)
Browse files Browse the repository at this point in the history
* CI: use extra Action for testing documentation

* Disable linkcheck
  • Loading branch information
hagenw authored Jul 13, 2023
1 parent 886baed commit ee2cef4
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 15 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
23 changes: 8 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,31 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04, 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'
os: [ ubuntu-latest, windows-latest, macOS-latest]
python-version: [ '3.8', '3.9', '3.10', '3.11' ]

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 dependencies
run: |
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
run: |
python -m pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
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
if: matrix.os == 'ubuntu-20.04'
if: matrix.os == 'ubuntu-latest'

0 comments on commit ee2cef4

Please sign in to comment.