forked from CExA-project/ddc
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (43 loc) · 1.16 KB
/
Copy pathpython-checks.yaml
File metadata and controls
48 lines (43 loc) · 1.16 KB
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
# Copyright (C) The DDC development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT
---
name: Python checks
# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- '.github/workflows/python-checks.yaml'
- '**.py'
push:
branches:
- main
paths:
- '.github/workflows/python-checks.yaml'
- '**.py'
workflow_dispatch:
permissions:
contents: read
jobs:
python-format:
name: Python format using black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
pipx install black~=25.11
- name: Check format using black
run: |
black --line-length 100 --check $(git ls-files '*.py')
python-lint:
name: Python lint using pylint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
pipx install pylint~=4.0
- name: Analysing the code with pylint
run: |
pylint $(git ls-files '*.py' ':!benchmarks/splines_plot.py')