Skip to content

Commit

Permalink
build: adds ckantest:next as a test target option
Browse files Browse the repository at this point in the history
To use it run docker-compose run next. This commit also removed the docker-compose run ckan option as there is no ckan service anymore, this has been renamed latest to reflect what it runs against.
  • Loading branch information
jrdh committed Sep 21, 2023
1 parent 08a9c9e commit 93714a3
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
19 changes: 17 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
version: "3"

services:
ckan:
latest:
build:
context: .
dockerfile: docker/Dockerfile
dockerfile: docker/Dockerfile_latest
environment:
PYTHONUNBUFFERED: 1
PYTHONDONTWRITEBYTECODE: 1
depends_on:
- db
- solr
- redis
volumes:
- ./ckanext:/base/src/ckanext-ldap/ckanext
- ./tests:/base/src/ckanext-ldap/tests

next:
build:
context: .
dockerfile: docker/Dockerfile_next
environment:
PYTHONUNBUFFERED: 1
PYTHONDONTWRITEBYTECODE: 1
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions docker/Dockerfile_next
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM naturalhistorymuseum/ckantest:next

# required by python-ldap
RUN apt-get -q -y install libldap2-dev libsasl2-dev \
&& apt-get -q clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /base/src/ckanext-ldap

# copy over the source
COPY . .

# install the base + test dependencies
RUN pip install -e .[test]

# this entrypoint ensures our service dependencies (postgresql, solr and redis) are running before
# running the cmd
ENTRYPOINT ["/bin/bash", "/opt/waits/basic.sh"]

# run the tests with coverage output
CMD ["bash", "/opt/scripts/run-tests.sh", "ckanext.ldap"]

0 comments on commit 93714a3

Please sign in to comment.