From 9013070168b1a51f7d911ae09d5178020697fc83 Mon Sep 17 00:00:00 2001 From: Aminda Suomalainen Date: Mon, 22 May 2023 18:39:12 +0300 Subject: [PATCH] Add gitlab-ci configuration --- .gitignore | 1 + .gitlab-ci.yml | 16 ++++++++++++++++ .pre-commit-config.yaml | 7 +++++++ 3 files changed, 24 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 1388fd1..a719cc8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *~ .~*# +.cache/** # ---> TeX ## Core latex/pdflatex auxiliary files: diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..cfae6b4 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,16 @@ +# Based on https://pre-commit.com +image: python:alpine +gitlab-ci-pre-commit: + stage: build + before_script: + - apk add --no-cache git gcc musl-dev go texlive + - pip install pre-commit + script: + - pre-commit run --all-files --show-diff-on-failure + variables: + # Remember to gitignore .cache/** + 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 3b3bc9a..da18076 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,13 @@ repos: hooks: - id: doctoc args: [--update-only, --notitle] + - 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/pre-commit/mirrors-prettier rev: "v3.0.0-alpha.9-for-vscode" hooks: