forked from emc2-saar/cykel
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.28 KB
/
tests.yml
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
name: tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
name: tests
env:
SECRET_KEY: DUMMYSECRETVALUEFORTESTS
UI_SITE_URL: http://example.org
DATABASE_URL: 'postgis://cykel:cykel@127.0.0.1/cykel'
steps:
- uses: actions/checkout@v2
- uses: huaxk/postgis-action@v1
with:
postgresql version: '11'
postgresql password: 'cykel'
postgresql user: 'cykel'
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- uses: actions/cache@v1
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install geospatial libraries
run: sudo apt update && sudo apt-get install -y libproj-dev libgeos-dev libspatialite-dev libgdal-dev gdal-bin binutils proj-data proj-bin
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r requirements-dev.txt
- name: Run checks
run: python manage.py check
- name: Test
run: pytest -p no:sugar --maxfail=100 tests