Only run lint jobs for MRs

This commit is contained in:
Georg Krause 2022-09-15 10:39:06 +02:00
parent 15e4c2a895
commit d0fd2be799
No known key found for this signature in database
GPG Key ID: 2970D504B2183D22
1 changed files with 12 additions and 9 deletions

View File

@ -127,7 +127,8 @@ black:
- pip install black - pip install black
script: script:
- black --check --diff . - black --check --diff .
only: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: changes:
- api/**/* - api/**/*
@ -145,7 +146,8 @@ flake8:
key: "$CI_PROJECT_ID__flake8_pip_cache" key: "$CI_PROJECT_ID__flake8_pip_cache"
paths: paths:
- "$PIP_CACHE_DIR" - "$PIP_CACHE_DIR"
only: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: changes:
- api/**/* - api/**/*
@ -164,7 +166,8 @@ eslint:
key: "$CI_PROJECT_ID__eslint_npm_cache" key: "$CI_PROJECT_ID__eslint_npm_cache"
paths: paths:
- front/node_modules - front/node_modules
only: rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
changes: changes:
- front/**/* - front/**/*