Skip to content
Snippets Groups Projects

Update gitlab CI

Merged Bo-Chun Chen requested to merge louistw/account-app:update-ci into master
+ 36
4
image: "python:3.7"
image: "python:3.6"
 
 
# Change pip's cache directory to be inside the project directory since we can
 
# only cache local items.
 
variables:
 
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
 
 
cache:
 
paths:
 
- .cache/pip
 
- venv/
before_script:
before_script:
- python --version
- python --version
- pip install pylint
- python3 -m venv venv
 
- source venv/bin/activate
 
- pip install black==22.3.0 flake8==4.0.1 pylint==2.13.8
stages:
stages:
- lint
- lint
linting:
black:
 
tags:
 
- lint
 
stage: lint
 
script:
 
- black --check --diff .
 
only:
 
- merge_requests
 
 
flake8:
 
tags:
 
- lint
 
stage: lint
 
script:
 
- flake8 .
 
only:
 
- merge_requests
 
 
pylint:
tags:
tags:
- lint
- lint
stage: lint
stage: lint
script:
script:
- pylint --ignore=tests.py --max-line-length=120 *.py app
- pylint app *.py
 
only:
 
- merge_requests
Loading