-
-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
3 changed files
with
65 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,5 @@ source = numpydoc | |
include = */numpydoc/* | ||
omit = | ||
*/setup.py | ||
numpydoc/tests/* | ||
numpydoc/templates/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" |
This file was deleted.
Oops, something went wrong.