Skip to content

Commit edf8dbf

Browse files
committed
Run pre-commit
1 parent 7e55cfe commit edf8dbf

File tree

3 files changed

+25
-22
lines changed

3 files changed

+25
-22
lines changed

.github/workflows/ci.yaml

+2-21
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,14 @@ on:
99
branches:
1010
- "main"
1111
jobs:
12-
check-imports:
12+
pre-commit:
1313
runs-on: self-hosted
1414
steps:
1515
- uses: actions/checkout@v2
1616
- uses: ./.github/actions/python-poetry
17-
- run: poetry run isort --profile=black --check .
18-
check-formatting:
19-
runs-on: self-hosted
20-
steps:
21-
- uses: actions/checkout@v2
22-
- uses: ./.github/actions/python-poetry
23-
- run: poetry run black --check .
24-
check-linter:
25-
runs-on: self-hosted
26-
steps:
27-
- uses: actions/checkout@v2
28-
- uses: ./.github/actions/python-poetry
29-
- run: poetry run pylint program_admin tests
30-
check-types:
31-
runs-on: self-hosted
32-
steps:
33-
- uses: actions/checkout@v2
34-
- uses: ./.github/actions/python-poetry
35-
- run: poetry run mypy program_admin tests
17+
- uses: pre-commit/[email protected]
3618
run-tests:
3719
runs-on: self-hosted
38-
needs: [check-imports, check-formatting, check-linter, check-types]
3920
steps:
4021
- uses: actions/checkout@v2
4122
- uses: ./.github/actions/python-poetry

.pre-commit-config.yaml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: isort
5+
name: isort
6+
entry: poetry run isort --profile=black --check .
7+
language: system
8+
- id: black
9+
name: black
10+
entry: poetry run black --check .
11+
pass_filenames: false
12+
language: system
13+
- id: mypy
14+
name: mypy
15+
entry: poetry run mypy program_admin/ tests/
16+
pass_filenames: false
17+
language: system
18+
- id: pylint
19+
name: pylint
20+
entry: poetry run pylint program_admin/ tests/
21+
pass_filenames: false
22+
language: system

entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
set -e
44

5-
eval "exec $@"
5+
eval "exec $@"

0 commit comments

Comments
 (0)