From 2d6c474baabaf374773c032efa97c1e929b67517 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Tue, 16 Jun 2020 17:37:19 +0300 Subject: [PATCH] CI updates --- .gitlab-ci.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) 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: