From 337a0618b979396e222244effc275adf9f816d9a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laure=CE=B7t?= Date: Tue, 2 Nov 2021 21:39:50 +0100 Subject: [PATCH] fix(CI): compacted the linting stage --- .editorconfig | 2 +- .gitlab-ci.yml | 42 ++++++------------------------------------ 2 files changed, 7 insertions(+), 37 deletions(-) diff --git a/.editorconfig b/.editorconfig index 77c0d01..cd45b0f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,5 @@ charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true -[*.{yaml,toml}] +[*.{yaml,yml,toml}] indent_size = 2 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 35832c7..62b4e98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,41 +1,11 @@ stages: - lint -image: python:latest - -before_script: - - pip install pre-commit - - pre-commit install - -basic hooks: +pre-commit: stage: lint + image: python:latest + before_script: + - pip install pre-commit + - pre-commit install script: - - pre-commit run trailing-whitespace --all-files - - pre-commit run end-of-file-fixer --all-files - - pre-commit run check-yaml --all-files - - pre-commit run check-added-large-files --all-files - -mypy: - stage: lint - script: - - pre-commit run mypy --all-files - -isort: - stage: lint - script: - - pre-commit run isort --all-files - -black: - stage: lint - script: - - pre-commit run black --all-files - -flake8: - stage: lint - script: - - pre-commit run flake8 --all-files - -bandit: - stage: lint - script: - - pre-commit run bandit --all-files + - pre-commit run --all-files