This repository was archived by the owner on May 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
76 lines (68 loc) · 2.52 KB
/
.pre-commit-config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#!/usr/bin/env sh
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-toml
- id: check-merge-conflict
- id: check-json
- id: check-added-large-files
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v8.3.0
hooks:
- id: cspell
args: [--config, "./cspell.json"]
- repo: local
hooks:
- id: golangci-lint
name: golangci-lint
entry: sh -c 'cd api/ && docker build --target lint -t nfc-entry-management-api-lint:latest -f ./Dockerfile . && docker run --rm nfc-entry-management-api-lint:latest'
language: system
types: [go]
- repo: local
hooks:
- id: isort
name: isort
entry: sh -c 'cd nfc_reader/ && docker build --target isort -t nfc-entry-management-nfc-reader-isort:latest -f ./Dockerfile . && docker run --rm nfc-entry-management-nfc-reader-isort:latest'
language: system
types: [python]
- repo: local
hooks:
- id: black
name: black
entry: sh -c 'cd nfc_reader/ && docker build --target black -t nfc-entry-management-nfc-reader-black:latest -f ./Dockerfile . && docker run --rm nfc-entry-management-nfc-reader-black:latest'
language: system
types: [python]
- repo: local
hooks:
- id: mypy
name: mypy
entry: sh -c 'cd nfc_reader/ && docker build --target mypy -t nfc-entry-management-nfc-reader-mypy:latest -f ./Dockerfile . && docker run --rm nfc-entry-management-nfc-reader-mypy:latest'
language: system
types: [python]
- repo: local
hooks:
- id: pylint
name: pylint
entry: sh -c 'cd nfc_reader/ && docker build --target pylint -t nfc-entry-management-nfc-reader-pylint:latest -f ./Dockerfile . && docker run --rm nfc-entry-management-nfc-reader-pylint:latest'
language: system
types: [python]
- repo: local
hooks:
- id: go-tests
name: Run Go tests
entry: sh -c 'cd api/ && docker build --target test -t nfc-entry-management-api-test:latest -f ./Dockerfile . && docker run --env-file .env.api --rm nfc-entry-management-api-test:latest'
language: system
pass_filenames: false
stages: [commit]
- repo: local
hooks:
- id: docker-compose-check
name: Run docker-compose build
entry: docker-compose build
language: system
pass_filenames: false
stages: [commit]