CI - add lint stage

This commit is contained in:
Sam 2021-10-01 18:20:26 +02:00
parent ebf15c46e8
commit 3d56eb3c93

View File

@ -16,6 +16,7 @@ services:
alias: postgres
stages:
- lint
- tests
- selenium
@ -28,16 +29,33 @@ stages:
script:
- pytest fittrackee -p no:warnings --cov fittrackee --cov-report term-missing
lint:
.javascript:
stage: tests
before_script:
- apt-get update && apt-get install -y nodejs npm
- npm install --global yarn
- cd fittrackee_client
- yarn install
python-lint:
stage: lint
extends: .python
script:
- pytest --flake8 --isort --black -m "flake8 or isort or black" fittrackee e2e --ignore=fittrackee/migrations
type-check:
python-type-check:
stage: lint
extends: .python
script:
- mypy fittrackee
eslint:
stage: lint
extends: .javascript
script:
- yarn lint
python-3.7:
extends: .python
image: python:3.7