Skip to content
Snippets Groups Projects
Verified Commit cd0f74dc authored by Georg Krause's avatar Georg Krause
Browse files

Only run linter and tests for relevant changes

parent 802068c3
Branches
Tags
No related merge requests found
...@@ -104,6 +104,9 @@ black: ...@@ -104,6 +104,9 @@ black:
- pip install black==19.10b0 - pip install black==19.10b0
script: script:
- black --check --diff api/ - black --check --diff api/
only:
changes:
- api/**/*
flake8: flake8:
interruptible: true interruptible: true
...@@ -119,6 +122,9 @@ flake8: ...@@ -119,6 +122,9 @@ flake8:
key: "$CI_PROJECT_ID__flake8_pip_cache" key: "$CI_PROJECT_ID__flake8_pip_cache"
paths: paths:
- "$PIP_CACHE_DIR" - "$PIP_CACHE_DIR"
only:
changes:
- api/**/*
eslint: eslint:
interruptible: true interruptible: true
...@@ -137,6 +143,9 @@ eslint: ...@@ -137,6 +143,9 @@ eslint:
key: "$CI_PROJECT_ID__eslint_npm_cache" key: "$CI_PROJECT_ID__eslint_npm_cache"
paths: paths:
- front/node_modules - front/node_modules
only:
changes:
- front/**/*
test_api: test_api:
interruptible: true interruptible: true
...@@ -156,7 +165,10 @@ test_api: ...@@ -156,7 +165,10 @@ test_api:
POSTGRES_HOST_AUTH_METHOD: trust POSTGRES_HOST_AUTH_METHOD: trust
CACHE_URL: "redis://redis:6379/0" CACHE_URL: "redis://redis:6379/0"
only: only:
refs:
- branches - branches
changes:
- api/**/*
before_script: before_script:
- cd api - cd api
- pip3 install -r requirements/base.txt - pip3 install -r requirements/base.txt
...@@ -179,7 +191,10 @@ test_front: ...@@ -179,7 +191,10 @@ test_front:
before_script: before_script:
- cd front - cd front
only: only:
refs:
- branches - branches
changes:
- front/**/*
script: script:
- yarn install --check-files - yarn install --check-files
- yarn test:unit - yarn test:unit
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment