diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e2689d1..3ea7196 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -15,19 +15,24 @@ stages: lint: stage: test + variables: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + cache: paths: - .cache/pip - .venv/ + - ${PRE_COMMIT_HOME} before_script: + - apt-get update && apt-get install -y --no-install-recommends git - python --version - python -m venv .venv - source .venv/bin/activate - pip install -r requirements-dev.txt -U script: - - pylint $(find -type f -name "*.py" ! -path "./.venv/**" ! -path "./lib/**") + - pre-commit run --all-files build: stage: build