-
Notifications
You must be signed in to change notification settings - Fork 67
47 lines (45 loc) · 1.12 KB
/
main.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
44
45
46
47
name: Run tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: Run tests
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:11-3.3
env:
POSTGRES_DB: lametro
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install gdal-bin libxml2-dev
- uses: actions/checkout@v2
- name: Set up Python 3.6
uses: actions/setup-python@v2
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.6'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "setuptools-scm<7.0"
pip install -r requirements.txt
- name: Test with pytest
run: |
echo "TOKEN='faketoken'" > lametro/secrets.py
pytest -sv