50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v2.4.0
|
|
hooks:
|
|
- id: trailing-whitespace
|
|
- id: end-of-file-fixer
|
|
- id: check-yaml
|
|
- id: check-added-large-files
|
|
- repo: https://github.com/pre-commit/mirrors-eslint
|
|
rev: v7.1.0
|
|
hooks:
|
|
- id: eslint
|
|
files: client/js/
|
|
args: ['--fix']
|
|
- repo: https://gitlab.com/pycqa/flake8
|
|
rev: '3.8.2'
|
|
hooks:
|
|
- id: flake8
|
|
files: server/szurubooru/
|
|
additional_dependencies:
|
|
- flake8-print
|
|
args: ['--config=server/setup.cfg']
|
|
- repo: local
|
|
hooks:
|
|
- id: pytest
|
|
name: pytest
|
|
entry: >-
|
|
bash -c
|
|
'docker build -f server/Dockerfile.test -t $(git rev-parse --short HEAD)-test server/
|
|
&& docker run --rm -t $(git rev-parse --short HEAD)-test szurubooru/
|
|
&& docker rmi --no-prune $(git rev-parse --short HEAD)-test'
|
|
language: system
|
|
types: [python]
|
|
files: server/szurubooru/
|
|
pass_filenames: false
|
|
- id: docker-build-client
|
|
name: Test building the client in Docker
|
|
entry: bash -c 'docker build -t szurubooru-client:$(git rev-parse --short HEAD) client/'
|
|
language: system
|
|
types: [file]
|
|
files: client/
|
|
pass_filenames: false
|
|
- id: docker-build-server
|
|
name: Test building the server in Docker
|
|
entry: bash -c 'docker build -t szurubooru-server:$(git rev-parse --short HEAD) server/'
|
|
language: system
|
|
types: [file]
|
|
files: server/
|
|
pass_filenames: false
|
|
exclude: LICENSE.md
|