Skip to content
Snippets Groups Projects
Verified Commit e3ca2ba3 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
1 merge request!1Resolve "Configure gitlab-ci"
Pipeline #82672 passed
---
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
script:
- pre-commit install -t pre-commit
- pre-commit run --all --verbose
...@@ -3,26 +3,20 @@ default_stages: [ commit, manual ] ...@@ -3,26 +3,20 @@ default_stages: [ commit, manual ]
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v4.5.0
hooks: hooks:
- id: no-commit-to-branch - id: no-commit-to-branch
args: [ --branch, main ] args: [ --branch, main ]
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v4.5.0
hooks: hooks:
- id: trailing-whitespace - id: trailing-whitespace
- id: end-of-file-fixer - id: end-of-file-fixer
- id: fix-byte-order-marker - id: fix-byte-order-marker
- repo: https://github.com/ansible-community/ansible-lint.git - repo: https://github.com/ansible-community/ansible-lint.git
rev: v6.14.0a0 rev: v6.22.0
hooks: hooks:
- name: Run ansible-lint - name: Run ansible-lint
id: ansible-lint id: ansible-lint
- repo: https://github.com/jorisroovers/gitlint
rev: v0.19.0dev
hooks:
- name: Run gitlint
id: gitlint
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