-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (63 loc) · 1.73 KB
/
default.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Test
on: [push, pull_request]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:13-3.1
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
PGHOST: localhost
PGUSER: postgres
PGPASSWORD: password
CFLAGS: "-O0"
steps:
- uses: actions/checkout@v2
- name: Install system packages
run: sudo apt-get install binutils libproj-dev gdal-bin
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Load cached venv
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/.npm
key: ${{ runner.os }}-pip-node-${{ hashFiles('**/poetry.lock', '**/package-lock.json') }}
- name: Install dependencies
env:
POETRY_VIRTUALENVS_CREATE: "false"
run: |
pip install poetry==1.1.6
poetry install --no-interaction --no-root
pip install codecov
(cd cobrand_hackney && npm install)
- name: Set up database
run: |
createdb noiseworks
psql -d noiseworks -c 'create extension postgis;'
- name: Create storage folder
run: mkdir storage
- name: Run tests
env:
SECRET_KEY: 'secret'
DATABASE_URL: 'postgis://postgres:password@localhost/noiseworks'
COBRAND: 'cobrand_hackney'
FILE_STORAGE_RELATIVE_PATH: 'storage'
LOG_LEVEL: 'DEBUG'
LOG_FILE: 'noise.log'
run: coverage run -m pytest
- name: Upload code coverage
run: codecov