-
Notifications
You must be signed in to change notification settings - Fork 9
47 lines (39 loc) · 1.04 KB
/
style-check.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
47
name: Python code style check
on:
pull_request:
branches:
- master
jobs:
style:
name: style
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Overwrite .mise.toml # It's not needed in this workflow
run: |
cat <<EOF > .mise.toml
[tools]
"pipx:black" = "24.10"
"pipx:isort" = "5.13"
python = "3.12"
uv = "0.4"
[settings]
pipx_uvx = true
EOF
- name: Install dependencies
uses: jdx/mise-action@v2
with:
cache: true
experimental: true
install: true
- name: Check import style with isort
run: isort . --check --profile black --diff
- name: Check code style with Black
run: black . --check --diff
- name: Check Tiltfiles with Black
run: |
find . -type f -name "Tiltfile" | while read -r file; do
black --check --diff "$file"
done