Browse Source

Ensure eslint gets run during CI

pull/119/head
Clemens Wolff 5 years ago
parent
commit
e40a3e12d7
3 changed files with 10 additions and 12 deletions
  1. 12
      .travis.yml
  2. 8
      Dockerfile
  3. 2
      tools/ci.sh

12
.travis.yml

@ -1,18 +1,10 @@
language: python
language: minimal
services: services:
- docker - docker
python:
- "3.6"
cache: pip
install:
- pip install -r requirements.txt
script: script:
- tools/ci.sh
- docker build .
deploy: deploy:
- provider: script - provider: script

8
Dockerfile

@ -17,11 +17,15 @@ RUN pip install -r /requirements.txt \
COPY app/server/static /doccano/app/server/static/ COPY app/server/static /doccano/app/server/static/
COPY app/server/webpack.config.js /doccano/app/server/ COPY app/server/webpack.config.js /doccano/app/server/
RUN cd /doccano/app/server \ RUN cd /doccano/app/server \
&& DEBUG=False npm run build \
&& rm -rf node_modules/
&& DEBUG=False npm run build
COPY . /doccano COPY . /doccano
RUN cd /doccano \
&& tools/ci.sh
RUN rm -rf /doccano/app/server/node_modules/
FROM python:${PYTHON_VERSION}-slim AS runtime FROM python:${PYTHON_VERSION}-slim AS runtime
COPY --from=builder /deps /deps COPY --from=builder /deps /deps

2
tools/ci.sh

@ -6,3 +6,5 @@ flake8
python app/manage.py migrate python app/manage.py migrate
python app/manage.py collectstatic python app/manage.py collectstatic
python app/manage.py test server.tests python app/manage.py test server.tests
(cd app/server && npm run lint)
Loading…
Cancel
Save