Skip to content

Instantly share code, notes, and snippets.

@mattcanty
Created May 17, 2020 08:40
Show Gist options
  • Save mattcanty/babff7e4770aa00d8ceaa312225a3b9a to your computer and use it in GitHub Desktop.
Save mattcanty/babff7e4770aa00d8ceaa312225a3b9a to your computer and use it in GitHub Desktop.
pre-commit GitLab CI
variables:
XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache/"
cache:
paths:
- .cache/pip
- .cache/pre-commit
precommit:
image: golang
before_script:
- python -V
- apt-get update
- apt-get install -y python-pip
- pip install pre-commit
script:
- SKIP=go-unit-tests pre-commit run --all-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment