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 alias: postgres
stages: stages:
- lint
- tests - tests
- selenium - selenium
@ -28,16 +29,33 @@ stages:
script: script:
- pytest fittrackee -p no:warnings --cov fittrackee --cov-report term-missing - 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 extends: .python
script: script:
- pytest --flake8 --isort --black -m "flake8 or isort or black" fittrackee e2e --ignore=fittrackee/migrations - pytest --flake8 --isort --black -m "flake8 or isort or black" fittrackee e2e --ignore=fittrackee/migrations
type-check: python-type-check:
stage: lint
extends: .python extends: .python
script: script:
- mypy fittrackee - mypy fittrackee
eslint:
stage: lint
extends: .javascript
script:
- yarn lint
python-3.7: python-3.7:
extends: .python extends: .python
image: python:3.7 image: python:3.7