Skip to content

Commit 00752f5

Browse files
committed
pytests with gha
1 parent 2b4b081 commit 00752f5

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
conda activate jupyter-sphinx
2222
python -m ipykernel install --user --name python3 --display-name "Python3"
2323
pip install --user .
24-
24+
2525
cd doc
2626
make html
2727
@@ -35,6 +35,6 @@ jobs:
3535

3636
workflows:
3737
version: 2
38-
default:
38+
build_docs:
3939
jobs:
4040
- build_docs

.github/workflows/tests.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,41 @@ 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]
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: Setup Miniconda
22+
uses: goanpeca/[email protected]
23+
24+
- name: Install dependencies
25+
run: |
26+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
27+
bash miniconda.sh -b -p $HOME/miniconda
28+
export PATH="$HOME/miniconda/bin:$PATH"
29+
source "$HOME"/miniconda/etc/profile.d/conda.sh
30+
conda config --set always_yes yes --set changeps1 no
31+
conda env create -f environment.yml
32+
conda activate jupyter-sphinx
33+
python -m ipykernel install --user --name python3 --display-name "Python3"
34+
pip install .
35+
36+
pytest
37+
738
publish:
839

940
name: Publish to PyPi
41+
needs: [tests]
1042
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
1143
runs-on: ubuntu-latest
1244
steps:

0 commit comments

Comments
 (0)