test
Some checks failed
Pre-commit checks / Pre-commit (pull_request) Failing after 4s
DCO / DCO (pull_request) Failing after 46s

This commit is contained in:
Ori Bruk 2024-10-25 16:43:50 +03:00
parent 59356180d5
commit 0e82c4433f
5 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,16 @@
name: Pre-commit checks
on: [pull_request]
jobs:
pre-commit:
name: Pre-commit
runs-on: docker
container: git.frostfs.info/truecloudlab/env:python-${{ matrix.py }}
steps:
- uses: actions/checkout@v3
- name: Install deps
run: |
apt update
apt install -y pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --hook-stage manual --color=always

16
.pre-commit-config.yaml Normal file
View file

@ -0,0 +1,16 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: check-xml
- id: check-yaml
- repo: local
hooks:
- id: make-verify
name: Run make verify
entry: make verify
language: system
pass_filenames: false

22
Makefile Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/make -f
SHELL=bash
include help.mk
.PHONY: verify
# Regenerate documentation for proto files:
verify:
mvn clean verify
# Activate pre-commit hooks
pre-commit:
pre-commit install --hook-type pre-commit
# Deactivate pre-commit hooks
unpre-commit:
pre-commit uninstall --hook-type pre-commit
# Run pre-commit hooks
pre-commit-run:
@pre-commit run --all-files --hook-stage manual

11
help.mk Normal file
View file

@ -0,0 +1,11 @@
.PHONY: help
# Show this help prompt
help:
@echo ' Usage:'
@echo ''
@echo ' make <target>'
@echo ''
@echo ' Targets:'
@echo ''
@awk '/^#/{ comment = substr($$0,3) } /^[a-zA-Z][a-zA-Z0-9_-]+:/{ print " ", $$1, comment; comment = "" }' $(MAKEFILE_LIST) | column -t -s ':' | grep -v 'IGNORE' | sort | uniq

10
pom.xml
View file

@ -85,6 +85,16 @@
</executions>
<version>3.4.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
</plugin>
</plugins>
</build>
</project>