-
-
Notifications
You must be signed in to change notification settings - Fork 21
46 lines (38 loc) · 964 Bytes
/
lint.yml
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
name: Lint
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: False
matrix:
python: [3.11]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 2
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Install pre-commit
run: |
pip install pre-commit
pre-commit install
pre-commit autoupdate
- name: Changed files
run: git diff --name-only HEAD^ HEAD
- name: Run pre-commit
run: git diff --name-only HEAD^ HEAD | xargs pre-commit run --show-diff-on-failure --files
# - name: Lint Code Base
# uses: docker://github/super-linter:v2.2.0
# env:
# VALIDATE_ALL_CODEBASE: false