Skip to content

Commit

Permalink
Move from readthedocs to github pages (#182)
Browse files Browse the repository at this point in the history
And other CI fixes
  • Loading branch information
HDembinski authored Feb 12, 2024
1 parent 51832c3 commit c641955
Show file tree
Hide file tree
Showing 4 changed files with 70 additions and 48 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/coverage.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Docs

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# must come after checkout
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- run: sudo apt-get install pandoc
- run: pip install .[doc]
- run: cd doc; make html
- uses: actions/upload-pages-artifact@v3
with:
path: 'doc/_build/html'

deploy:
if: github.event_name == 'workflow_dispatch' || github.ref_name == 'main'
needs: build
# Set permissions to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- uses: actions/configure-pages@v4
- uses: actions/deploy-pages@v4
29 changes: 22 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,30 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version:
- "3.8"
- "3.11"

include:
# version number must be string, otherwise 3.10 becomes 3.1
- os: windows-latest
python-version: "3.12"
- os: ubuntu-latest
python-version: "3.10"
- os: macos-latest
python-version: "3.8"
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: python -m pip install --upgrade pip
- run: python -m pip install -e .[test]
- run: python -m pytest

- if: ${{ matrix.os != 'ubuntu-latest' }}
run: python -m pytest

# toml is needed only by coveralls
- if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
python -m pip install toml
JUPYTER_PLATFORM_DIRS=1 coverage run -m pytest
- if: ${{ matrix.os == 'ubuntu-latest' }}
uses: AndreMiras/coveralls-python-action@develop
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = "en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down

0 comments on commit c641955

Please sign in to comment.