-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (47 loc) · 1.26 KB
/
lint-python.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
name: Lint Python
on:
pull_request:
paths:
- 'pyultima/**'
- '.github/workflows/lint-python.yaml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
python_lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: pyultima
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: 'pyultima/requirements-lint.txt'
- name: Install Python dependencies
run: |
pip install --upgrade pip
pip install -r requirements-lint.txt
- name: Lint Python
run: |
black --check .
blackdoc --check .
isort --check .
ruff .
# Rust clippy and fmt performed as part of lint-test-rust(main)
#- name: Set up Rust
# uses: dtolnay/rust-toolchain@master
# with:
# toolchain: stable
# components: rustfmt, clippy
#- name: Cache Rust
# uses: Swatinem/rust-cache@v2
# with:
# workspaces: pyultima
#- name: Lint Rust
# run: |
# cargo fmt -- --check
# make clippy