diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ea320b..4a0c7d4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,24 @@ stages: + - install - lint - test - publish - deploy +install: + image: node:12 + stage: setup + script: + - npm ci + artifacts: + paths: + - node_modules + expire_in: 1 week + test: image: python:3.7 stage: test + needs: [] services: - postgres:12 variables: @@ -25,6 +37,7 @@ test: lint:pycodestyle: image: python:3.7 stage: lint + needs: [] script: - pip install pycodestyle - pycodestyle --config=setup.cfg --count . @@ -32,22 +45,21 @@ lint:pycodestyle: lint:eslint: image: node:alpine stage: lint - before_script: - - npm install + needs: ["install"] script: - npm run eslint lint:remark: image: node:alpine stage: lint - before_script: - - npm install + needs: ["install"] script: - npm run remark publish: stage: publish image: docker:stable + needs: ["test", "lint:pycodestyle", "lint:eslint", "lint:remark"] services: - docker:stable-dind only: