File: step_test-docs.yaml

package info (click to toggle)
spglib 2.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 14,180 kB
  • sloc: ansic: 125,066; python: 7,717; cpp: 2,197; f90: 2,143; ruby: 792; makefile: 22; sh: 18
file content (48 lines) | stat: -rw-r--r-- 1,353 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: 📘 test-docs

on:
  workflow_call:

permissions:
  contents: read

jobs:
  doc-test:
    name: Sphinx-${{ matrix.builder }}
    runs-on: ubuntu-latest
    continue-on-error: ${{ matrix.experimental || false }}
    strategy:
      fail-fast: false
      matrix:
        builder: [ linkcheck, doctest, html ]
        include:
          # Run default html builder with warnings as error
          - builder: html
            args: -W
    steps:
      - uses: actions/checkout@v6
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v6
        with:
          python-version: 3.x
      - name: Install the project and docs dependencies
        run: pip install -e .[docs]
        # https://bitbucket.org/pybtex-devs/pybtex/issues/169/replace-pkg_resources-with
      - name: Temporary workaround for pybtex
        run: pip install setuptools
      - name: Run sphinx builder ${{ matrix.builder }}
        run: sphinx-build -b ${{ matrix.builder }} ${{ matrix.args }} ./docs ./docs/_build

  sphinx-apidoc:
    name: Sphinx-apidoc
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-python@v6
        with:
          python-version: 3.x
      - name: Run sphinx-apidoc and check for diffs
        run: |
          pipx run ./docs/generate-apidoc.py
          git diff --exit-code