Skip to content

Commit bd83f27

Browse files
authored
Merge pull request #121 from choldgraf/gha_tests
pytests with gha
2 parents 2b4b081 + 07d9058 commit bd83f27

File tree

6 files changed

+43
-66
lines changed

6 files changed

+43
-66
lines changed

.circleci/config.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,31 +10,23 @@ jobs:
1010

1111
# Install
1212
- run:
13-
name: Installation and docs build
13+
name: Install dependencies
1414
command: |
15-
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
16-
bash miniconda.sh -b -p $HOME/miniconda
17-
export PATH="$HOME/miniconda/bin:$PATH"
18-
source "$HOME"/miniconda/etc/profile.d/conda.sh
19-
conda config --set always_yes yes --set changeps1 no
20-
conda env create -f environment.yml
21-
conda activate jupyter-sphinx
22-
python -m ipykernel install --user --name python3 --display-name "Python3"
15+
pip install --user -r requirements.txt
2316
pip install --user .
24-
17+
- run:
18+
name: Build documentation
19+
command: |
2520
cd doc
2621
make html
2722
28-
29-
30-
3123
- store_artifacts:
3224
path: doc/build/html/
3325
destination: html
3426

3527

3628
workflows:
3729
version: 2
38-
default:
30+
build_docs:
3931
jobs:
4032
- build_docs

.github/workflows/tests.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,33 @@ on: [push, pull_request]
44

55
jobs:
66

7+
tests:
8+
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: [3.5, 3.6, 3.7, 3.8]
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v1
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
pip install .
26+
27+
- name: Run tests
28+
run: pytest
29+
730
publish:
831

932
name: Publish to PyPi
33+
needs: [tests]
1034
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
1135
runs-on: ubuntu-latest
1236
steps:

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

environment.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

readthedocs.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1-
conda:
2-
file: environment.yml
3-
formats: []
1+
python:
2+
version: 3.7
3+
install:
4+
- requirements: requirements.txt

requirements.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
sphinx==1.8.5
2+
ipywidgets>=7.0.0
3+
IPython
4+
nbconvert>=5.4
5+
nbformat
6+
7+
# For documentation building and testing
8+
matplotlib
9+
pytest

0 commit comments

Comments
 (0)