-
Notifications
You must be signed in to change notification settings - Fork 18
34 lines (25 loc) · 814 Bytes
/
linting.yml
File metadata and controls
34 lines (25 loc) · 814 Bytes
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
name: linting-and-code-formatting
on:
push:
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout IMAS-Python sources
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# until saxonche is available in 3.13
# https://saxonica.plan.io/issues/6561
python-version: "<3.13"
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install the code linting and formatting tools
run: pip install --upgrade 'black >=24,<25' flake8
- name: Check formatting of code with black
run: black --check imas
- name: Check linting with flake8
run: flake8 imas