From fe196a844e3e97df38a7ea15b1fe61a7bf68b96c Mon Sep 17 00:00:00 2001 From: Hagen Wierstorf Date: Wed, 26 Jul 2023 12:08:01 +0200 Subject: [PATCH] CI: use extra Action for testing documentation (#139) --- .github/workflows/doc.yml | 38 ++++++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 11 ++--------- 2 files changed, 40 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/doc.yml diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml new file mode 100644 index 00000000..0a6828aa --- /dev/null +++ b/.github/workflows/doc.yml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 65acb487..e0e3d66b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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'