Skip to content
Snippets Groups Projects
Verified Commit 51f123aa authored by wallun's avatar wallun
Browse files

ci(gitlab): run pre-commit in test stage

parent 991edba2
No related branches found
No related tags found
No related merge requests found
Pipeline #82668 failed
---
variables:
container_registry: docker.io
image_name: archlinux
image_version: latest
stages:
- test
- doc
pre-commit:
stage: test
image: ${container_registry}/${image_name}:${image_version}
before_script:
- pacman -Syu --noconfirm
- pacman -S git --noconfirm
- pacman -S pre-commit --noconfirm
- pacman -S sudo --noconfirm
- pacman -S base-devel --noconfirm
- useradd -G wheel aur_builder
- echo "aur_builder ALL=(ALL) NOPASSWD:ALL" |
tee /etc/sudoers.d/aur_builder
- sudo -u aur_builder git clone https://aur.archlinux.org/gitlint
/tmp/gitlint
- cd /tmp/gitlint
- sudo -u aur_builder makepkg -si --noconfirm
- git config --global user.name "${GITLAB_USER_LOGIN}"
- git config --global user.email "${GITLAB_USER_EMAIL}"
script:
- pre-commit install -t pre-commit
- pre-commit install -t commit-msg
- git log -1 --format=%B > /tmp/COMMIT_MSG
- pre-commit run gitlint
--hook-stage commit-msg
--commit-msg-filename /tmp/COMMIT_MSG
- pre-commit run --all --verbose
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment