Skip to content

Commit ae12f97

Browse files
authored
GitHub Actions take 2 (#1414)
* add tests via github actions * fix test * no tempplate * actually fail * use flake8-nb * notebook tests * let's give micromamba a hand * re-add geopandas * fix notebooks and stripout outputs * fix notebooks and stripout outputs * remove extra comma * add flake8/black config * let's use black quotes * split notebook tests * mplleaflet does not work with modern mpl and it is deprecated * fix var rename * name tests * try to brew isntall chromedriver * add publish * leave only docs on Travis-CI for now * remove mplleaflet and add jupyter * split tests and simplify * test * let's try conda instead * can we use the default? * re-add output and remove the HTML saved file * ignore ; on notebooks * use --strict-channel-priority * fix check manifest * micromamba installed 1.13.0 * move to conda
1 parent 4a5defd commit ae12f97

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+2587
-3835
lines changed

.appveyor.yml

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

.github/workflows/main.yml

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

.github/workflows/publish.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
packages:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
14+
- name: Set up Python
15+
uses: actions/setup-python@v1
16+
with:
17+
python-version: 3.8
18+
19+
- name: Get tags
20+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
21+
shell: bash
22+
23+
- name: Install build tools
24+
run: |
25+
python -m pip install --upgrade pip wheel setuptools setuptools_scm build twine "branca>=0.3.0" "jinja2>=2.9" numpy requests
26+
27+
shell: bash
28+
29+
- name: Build binary wheel
30+
run: python -m build --sdist --wheel . --outdir dist
31+
32+
- name: CheckFiles
33+
run: |
34+
ls dist
35+
shell: bash
36+
37+
- name: Test wheels
38+
run: |
39+
cd dist && python -m pip install folium*.whl
40+
python -m twine check *
41+
shell: bash
42+
43+
- name: Publish a Python distribution to PyPI
44+
uses: pypa/gh-action-pypi-publish@master
45+
with:
46+
user: __token__
47+
password: ${{ secrets.PYPI_PASSWORD }}

.github/workflows/test_code.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Code Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
run:
13+
runs-on: ${{ matrix.os }}
14+
strategy:
15+
matrix:
16+
os: [ubuntu-latest, windows-latest]
17+
python-version: [3.6, 3.9]
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
22+
- name: Setup Conda
23+
uses: s-weigand/setup-conda@v1
24+
with:
25+
activate-conda: false
26+
conda-channels: conda-forge
27+
28+
- name: Python ${{ matrix.python-version }}
29+
shell: bash -l {0}
30+
run: |
31+
conda create --yes --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
32+
source activate TEST
33+
pip install -e . --no-deps --force-reinstall
34+
35+
- name: Tarball tests
36+
shell: bash -l {0}
37+
run: |
38+
source activate TEST
39+
pip wheel . -w dist --no-deps
40+
check-manifest --verbose
41+
twine check dist/*
42+
43+
- name: Tests
44+
shell: bash -l {0}
45+
run: |
46+
source activate TEST
47+
pytest -vv --ignore=tests/selenium
48+
49+
- name: Tests with latest branca
50+
shell: bash -l {0}
51+
run: |
52+
source activate TEST
53+
conda remove branca --yes
54+
pip install git+https://github.com/python-visualization/branca.git
55+
pytest -vv --ignore=tests/selenium
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Notebook Code Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Setup Conda
19+
uses: s-weigand/setup-conda@v1
20+
with:
21+
activate-conda: false
22+
conda-channels: conda-forge
23+
24+
- name: Create env
25+
shell: bash -l {0}
26+
run: |
27+
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
28+
source activate TEST
29+
pip install -e . --no-deps --force-reinstall
30+
31+
- name: Notebook tests
32+
shell: bash -l {0}
33+
run: |
34+
source activate TEST
35+
pytest --nbval-lax examples

.github/workflows/test_selenium.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Selenium Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Conda setup
18+
uses: s-weigand/[email protected]
19+
with:
20+
update-conda: true
21+
22+
- name: Conda environment creation
23+
shell: bash -l {0}
24+
run: |
25+
conda create --yes --name TEST python=3.9 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
26+
source activate TEST
27+
pip install -e . --no-deps --force-reinstall
28+
29+
- name: Selenium tests
30+
shell: bash -l {0}
31+
run: |
32+
source activate TEST
33+
pytest tests/selenium -vv
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Notebook Style Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
run:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- name: Setup Conda
19+
uses: s-weigand/setup-conda@v1
20+
with:
21+
activate-conda: false
22+
conda-channels: conda-forge
23+
24+
- name: Create env
25+
shell: bash -l {0}
26+
run: |
27+
conda create --yes --name TEST python=3 pip --file requirements.txt --file requirements-dev.txt --channel conda-forge --strict-channel-priority
28+
source activate TEST
29+
pip install -e . --no-deps --force-reinstall
30+
31+
- name: Notebook coding standards tests
32+
shell: bash -l {0}
33+
run: |
34+
source activate TEST
35+
flake8-nb examples --ignore=W391,E226,E402,W504,I100,I201,I202,E703 --max-line-length=120 --show-source --count

0 commit comments

Comments
 (0)