summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authorRoss Barnowski <rossbar@berkeley.edu>2020-12-15 05:17:56 -0800
committerGitHub <noreply@github.com>2020-12-15 08:17:56 -0500
commitff4bfd4e469d63069572d39318ed628eca892097 (patch)
treeb0a1a0cea54b4dc60ed40c6dce3e3fc5c0309f30 /.github/workflows/test.yml
parentbb96d0fca570cec533251ef4c0f309020a5dca04 (diff)
downloadnumpydoc-ff4bfd4e469d63069572d39318ed628eca892097.tar.gz
CI: Switch from travis to Github actions for tests (#307)
* Setup test workflow with github actions * Add sphinx version to matrix. * Add doc building to test workflow. * Add codecov step to test workflow. * Remove travis config. * WIP: try without action.
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml63
1 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..c6eafc5
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,63 @@
+name: numpydoc tests
+
+on:
+ push:
+ branches: [ master ]
+ pull_request:
+ branches: [ master ]
+
+jobs:
+ test:
+ runs-on: ${{ matrix.os }}-latest
+ strategy:
+ matrix:
+ os: [Ubuntu]
+ python-version: [3.6, 3.7, 3.8, 3.9]
+ sphinx-version: ["sphinx==1.6.5", "sphinx==2.1", "sphinx>3.0"]
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Python setup
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python-version }}
+
+ - name: Setup environment
+ run: |
+ python -m venv venv
+ source venv/bin/activate
+
+ - name: Install
+ run: |
+ python -m pip install --upgrade pip wheel setuptools
+ python -m pip install -r test_requirements.txt -r doc/requirements.txt
+ python -m pip install codecov
+ python -m pip install ${{ matrix.sphinx-version }}
+ python -m pip install .
+ pip list
+
+ - name: Run test suite
+ run: |
+ pytest -v --pyargs .
+
+ - name: Test coverage
+ run: |
+ codecov
+
+ - name: Make sure CLI works
+ run: |
+ python -m numpydoc numpydoc.tests.test_main._capture_stdout
+ echo '! python -m numpydoc numpydoc.tests.test_main._invalid_docstring' | bash
+ python -m numpydoc --validate numpydoc.tests.test_main._capture_stdout
+ echo '! python -m numpydoc --validate numpydoc.tests.test_main._docstring_with_errors' | bash
+
+ - name: Setup for doc build
+ run: |
+ # Get scipy-sphinx-theme
+ git submodule update --init
+ sudo apt install texlive texlive-latex-extra latexmk dvipng
+
+ - name: Build documentation
+ run: |
+ make -C doc html SPHINXOPTS="-nT"
+ make -C doc latexpdf SPHINXOPTS="-nT"