diff --git a/.travis.yml b/.travis.yml index 8518313c..e2d5bc54 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,18 +1,10 @@ -language: python +language: minimal services: - docker -python: - - "3.6" - -cache: pip - -install: - - pip install -r requirements.txt - script: - - tools/ci.sh + - docker build . deploy: - provider: script diff --git a/Dockerfile b/Dockerfile index 046a684e..35fef53f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,11 +17,15 @@ RUN pip install -r /requirements.txt \ COPY app/server/static /doccano/app/server/static/ COPY app/server/webpack.config.js /doccano/app/server/ RUN cd /doccano/app/server \ - && DEBUG=False npm run build \ - && rm -rf node_modules/ + && DEBUG=False npm run build COPY . /doccano +RUN cd /doccano \ + && tools/ci.sh + +RUN rm -rf /doccano/app/server/node_modules/ + FROM python:${PYTHON_VERSION}-slim AS runtime COPY --from=builder /deps /deps diff --git a/tools/ci.sh b/tools/ci.sh index 8342620e..3e4f9592 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -6,3 +6,5 @@ flake8 python app/manage.py migrate python app/manage.py collectstatic python app/manage.py test server.tests + +(cd app/server && npm run lint)