test2 #20
5 changed files with 75 additions and 0 deletions
16
.forgejo/workflows/pre-commit.yaml
Normal file
16
.forgejo/workflows/pre-commit.yaml
Normal 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
16
.pre-commit-config.yaml
Normal 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
22
Makefile
Executable 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
11
help.mk
Normal 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
10
pom.xml
|
@ -85,6 +85,16 @@
|
||||||
</executions>
|
</executions>
|
||||||
<version>3.4.0</version>
|
<version>3.4.0</version>
|
||||||
</plugin>
|
</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>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
Loading…
Reference in a new issue