-
Notifications
You must be signed in to change notification settings - Fork 55
62 lines (51 loc) · 1.92 KB
/
CI-tests.yml
File metadata and controls
62 lines (51 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Tests
on:
push:
pull_request:
schedule:
- cron: "0 0 * * *" # repeat every day
jobs:
ubuntu-latest:
name: ${{ matrix.os }}, ${{ matrix.env }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
env:
- .github/envs/39-latest-conda-forge.yaml
steps:
- uses: actions/checkout@v2
- name: Set up Python environment
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: ${{ matrix.env }}
miniforge-version: latest
mamba-version: "*"
use-mamba: true
- name: Check Environment
run: |
python -V
python -c "import trackintel; trackintel.print_version();"
conda info
- name: Test with pytest
run: |
pytest -v -r s --color=yes --cov=trackintel --cov-append --cov-report term-missing --cov-report xml tests/
- name: Test with PostGIS
if: contains(matrix.env, '39-latest-conda-forge.yaml') && contains(matrix.os, 'ubuntu')
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: "127.0.0.1"
run: |
conda install postgis -c conda-forge
source .github/envs/setup_postgres.sh
pytest -v -r s --color=yes --cov=trackintel --cov-append --cov-report term-missing --cov-report xml tests/io/test_postgis.py | tee /dev/stderr | if grep SKIPPED >/dev/null;then echo "TESTS SKIPPED, FAILING" && exit 1;fi
- name: Codecov report
if: contains(matrix.env, '39-latest-conda-forge.yaml') && contains(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v1