2023-05-22 17:39:12 +02:00
|
|
|
# Based on https://pre-commit.com
|
|
|
|
image: python:alpine
|
|
|
|
gitlab-ci-pre-commit:
|
|
|
|
stage: build
|
|
|
|
before_script:
|
2023-05-22 18:01:44 +02:00
|
|
|
- apk add --no-cache git gcc musl-dev go
|
2023-05-22 17:39:12 +02:00
|
|
|
- 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
|
2023-05-22 18:01:44 +02:00
|
|
|
# TODO: How to LaTeX on Alpine? texmf-dist texlive packages aren't enough
|
|
|
|
# for the artikel3 or similar templates.
|
|
|
|
SKIP: latexmk
|
2023-05-22 17:39:12 +02:00
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
- ${PRE_COMMIT_HOME}
|