-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
82 lines (69 loc) · 1.96 KB
/
lint.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
77
78
79
80
81
82
name: Lint
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: lint-${{ github.ref }}
cancel-in-progress: true
jobs:
matrix:
runs-on: ubuntu-latest
name: Run ${{ matrix.check }}
strategy:
matrix:
check:
- pyupgrade
- black
- codespell
- check-executables-have-shebangs
- check-json
- requirements-txt-fixer
- check-ast
- mixed-line-ending
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v3.5.3
- name: 🛠️ Set up Python
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: "3.x"
- name: 📦 Install pre-commit
run: |
scripts/install/pip_packages pre-commit
pre-commit install-hooks --config .github/pre-commit-config.yaml
- name: 🏃 Run the check (${{ matrix.check }})
run: pre-commit run --hook-stage manual ${{ matrix.check }} --all-files --config .github/pre-commit-config.yaml
lint-custom:
runs-on: ubuntu-latest
name: With bellybutton
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v3.5.3
- name: 🛠️ Set up Python
uses: actions/setup-python@v4.6.1
id: python
with:
python-version: "3.x"
cache: 'pip'
cache-dependency-path: |
requirements_base.txt
requirements_lint.txt
- name: 📦 Install requirements
run: scripts/install/pip_packages --requirement requirements_lint.txt
- name: ✅ Add problem matcher
run: echo "::add-matcher::.github/matchers/bellybutton.json"
- name: 🏃 Run validation
run: bellybutton lint
lint-json:
runs-on: ubuntu-latest
name: With JQ
steps:
- name: 📥 Checkout the repository
uses: actions/checkout@v3.5.3
- name: 🏃 Run validation
run: jq -r -e -c . tests/fixtures/*.json