Skip to content

Commit b608495

Browse files
committed
GH actions for tests
1 parent 0a8b9b9 commit b608495

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: 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+
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: [3.6, 3.9]
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Install micromamba
25+
shell: bash -l {0}
26+
run: |
27+
DIR=bin
28+
if [ "$RUNNER_OS" == "Linux" ]; then
29+
url=https://micromamba.snakepit.net/api/micromamba/linux-64/latest
30+
elif [ "$RUNNER_OS" == "Windows" ]; then
31+
url=https://micromamba.snakepit.net/api/micromamba/win-64/latest
32+
DIR=Library/bin
33+
else
34+
url=https://micromamba.snakepit.net/api/micromamba/osx-64/latest
35+
fi
36+
wget -qO- $URL | tar -xvj bin/micromamba
37+
mv $DIR/micromamba* ./micromamba
38+
./micromamba shell init -s bash -p ~/micromamba
39+
mkdir -p ~/micromamba/pkgs/
40+
41+
- name: Mamba create env
42+
shell: bash -l {0}
43+
run: |
44+
export MAMBA_ROOT_PREFIX=~/micromamba
45+
export MAMBA_EXE=$(pwd)/micromamba
46+
. $MAMBA_ROOT_PREFIX/etc/profile.d/mamba.sh
47+
./micromamba create --yes --name TEST python=${{ matrix.python-version }} pip --file requirements.txt --file requirements-dev.txt --channel conda-forge
48+
./micromamba activate TEST
49+
50+
51+
- name: Install folium
52+
shell: bash -l {0}
53+
run: |
54+
pip install -e . --no-deps --force-reinstall
55+
56+
- name: Run tests
57+
shell: bash -l {0}
58+
run: |
59+
cp -r tests/ examples/ /tmp
60+
pytest /tmp -vv --ignore=/tmp/tests/selenium

0 commit comments

Comments
 (0)