From 4fcc867d139054e17347f595c57a81f8bf84448b Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 22 May 2023 16:54:10 +0300 Subject: [PATCH] add .gitlab-ci.yml and pre-commit configuration --- .gitlab-ci.yml | 15 +++++++++++++++ .pre-commit-config.yaml | 14 +++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..235bb18d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +# Based on https://pre-commit.com +image: python:alpine +gitlab-ci-pre-commit: + stage: build + before_script: + - apk update && apk add git gcc musl-dev + - pip install pre-commit + script: + - pre-commit run --all-files --show-diff-on-failure + variables: + PRE_COMMIT_HOME: ${CI_PROJECT_DIR}/.cache/pre-commit + TERM: dumb + cache: + paths: + - ${PRE_COMMIT_HOME} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 86cc9094..a7a2ea88 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -43,13 +43,13 @@ repos: # - id: mypy # GitHub Actions etc. configuration validity checking - # - repo: https://github.com/python-jsonschema/check-jsonschema - # rev: 0.23.0 - # hooks: - # - id: check-dependabot - # - id: check-github-actions - # - id: check-github-workflows - # - id: check-gitlab-ci + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.23.0 + hooks: + #- id: check-dependabot + #- id: check-github-actions + #- id: check-github-workflows + - id: check-gitlab-ci # - repo: https://github.com/jumanjihouse/pre-commit-hooks # rev: 3.0.0