Skip to content
Snippets Groups Projects
Unverified Commit 5bc97302 authored by Sebastian Höffner's avatar Sebastian Höffner
Browse files

Copying tests to /tests to circumvent docker-in-docker volume mounting.

parent fe23181c
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,7 @@ RUN curl -o openccg-0.9.5.tgz https://datapacket.dl.sourceforge.net/project/open
&& pip3 install flask uwsgi tatsu
COPY app /app
COPY tests /tests
# Run Flask app behind nginx
WORKDIR /app
......
......@@ -4,13 +4,13 @@ pipeline {
stages {
stage('build') {
steps {
sh 'docker-compose build . -t web-openccg:$(git rev-parse --short HEAD)'
sh 'docker build . -t web-openccg:$(git rev-parse --short HEAD)'
}
}
stage('test') {
steps {
sh 'docker-compose -p litmus run --rm -v $(pwd)/tests:/tests openccg python3 -m unittest discover /tests'
sh 'docker run --rm web-openccg:$(git rev-parse --short HEAD) python3 -m unittest discover /tests'
}
}
......
......@@ -3,8 +3,8 @@ app/generated_openccg_parser.py: OpenCCG.ebnf
.PHONY: run
run:
docker-compose run --rm -p 5000:5000 -v $$(pwd)/app:/app openccg python3 /app/ccgapp.py
docker run --rm -p 5000:5000 -v $$(pwd)/app:/app:ro web-openccg python3 /app/ccgapp.py
.PHONY: test
test:
docker-compose run --rm -v $$(pwd)/app:/app -v $$(pwd)/tests:/tests openccg python3 -m unittest discover /tests
docker run --rm -v $$(pwd)/app:/app:ro -v $$(pwd)/tests:/tests:ro web-openccg python3 -m unittest discover /tests
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment