Skip to content
This repository was archived by the owner on May 5, 2022. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Dockerfile.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM python:3.4

RUN apt-get update && \
apt-get install -y \
libgdal1-dev \
gdal-bin && \
rm -rf /var/lib/apt/lists/*

COPY . /machine
WORKDIR /machine

ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
ENV C_INCLUDE_PATH=/usr/include/gdal

RUN pip install \
cairocffi \
gdal==1.10.0 && \
pip install -U .
14 changes: 14 additions & 0 deletions docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
machine-test:
build: .
volumes:
- .:/machine
dockerfile: Dockerfile.test
environment:
- DATABASE_URL=postgresql://openaddr:openaddr@postgres/openaddr
links:
- postgres
postgres:
image: mdillon/postgis
environment:
- POSTGRES_USER=openaddr
- POSTGRES_PASSWORD=openaddr
4 changes: 0 additions & 4 deletions openaddr/ci/schema.pgsql
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ CREATE VIEW dashboard_runs AS
SELECT round(extract(epoch from datetime_start)::numeric, 3)::text AS tsname
FROM sets;

GRANT SELECT ON dashboard_runs TO dashboard;

CREATE VIEW dashboard_stats AS
SELECT round(extract(epoch from s.datetime_start)::numeric, 3)::text AS tsname,
r.source_path AS source,
Expand All @@ -119,5 +117,3 @@ CREATE VIEW dashboard_stats AS
WHERE r.set_id IS NOT NULL
AND s.datetime_end IS NOT NULL
AND r.state::text != 'null';

GRANT SELECT ON dashboard_stats TO dashboard;