-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.67 KB
/
Copy pathtests.yml
File metadata and controls
54 lines (46 loc) · 1.67 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
# 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:
- environment.yml
steps:
- uses: actions/checkout@v2
- name: Set up Python environment
uses: conda-incubator/setup-miniconda@v2
with:
environment-file: ${{ matrix.env }}
miniforge-version: latest
miniforge-variant: Mambaforge
use-mamba: true
- name: Test with pytest
run: |
pytest -v -r s --color=yes --cov=graph_trackintel --cov-append --cov-report term-missing --cov-report xml tests/
- name: Test with PostGIS
if: contains(matrix.os, 'ubuntu')
env:
PGUSER: postgres
PGPASSWORD: postgres
PGHOST: "127.0.0.1"
run: |
conda install postgis=3.2.1 libxslt=1.1.33 -c conda-forge
source .github/envs/setup_postgres.sh
pytest -v -r s --color=yes --cov=graph_trackintel --cov-append --cov-report term-missing --cov-report xml tests/ | tee /dev/stderr | if grep SKIPPED >/dev/null;then echo "TESTS SKIPPED, FAILING" && exit 1;fi
- name: Codecov report
if: contains(matrix.os, 'ubuntu')
uses: codecov/codecov-action@v1