diff --git a/.github/workflows/test-sphinx.yml b/.github/workflows/test-sphinx.yml new file mode 100644 index 00000000..c44dcc92 --- /dev/null +++ b/.github/workflows/test-sphinx.yml @@ -0,0 +1,39 @@ +name: Test + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ${{ matrix.os }} + env: + python-version: '3.10' + strategy: + matrix: + os: [ 'ubuntu-latest' ] + python-version: [ '3.10' ] + sphinx: [ 'sphinx==5.3.0', 'sphinx==6.2.1', 'sphinx==7.*' ] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Set up ${{ matrix.sphinx }} + run: | + python -V + python -m pip install --upgrade pip + pip install -r requirements.txt + pip install -r docs/requirements.txt + pip install "${{ matrix.sphinx }}" + + - name: Tests + run: | + python -m sphinx docs/ build/html -b html -D html_theme=alabaster diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5de25dff..f98ba38f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -17,10 +17,8 @@ jobs: include: - os: ubuntu-latest python-version: '3.9' - tasks: tests - os: ubuntu-latest python-version: '3.11' - tasks: tests steps: - uses: actions/checkout@v4 diff --git a/audbcards/sphinx/__init__.py b/audbcards/sphinx/__init__.py index 89e4f945..b1b6bdb6 100644 --- a/audbcards/sphinx/__init__.py +++ b/audbcards/sphinx/__init__.py @@ -96,7 +96,7 @@ def builder_inited(app: sphinx.application.Sphinx): ) datacard.save(rst_file) datasets.append(dataset) - out_file = rst_file.replace(app.srcdir, os.path.basename(app.srcdir)) + out_file = rst_file.replace(str(app.srcdir), os.path.basename(app.srcdir)) print(f"wrote {out_file}") # Create datasets overview page