-
Notifications
You must be signed in to change notification settings - Fork 110
53 lines (43 loc) · 1.03 KB
/
style.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
48
49
50
51
52
53
name: Style
on:
push:
branches:
- main
- 'version-**'
pull_request:
jobs:
check-style:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.11']
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: |
setup.py
pyproject.toml
- name: Install ERT with style dependencies
run: |
pip install ".[style]"
- name: Clang Format
run: ./script/clang-format --check
- name: CMake Format
if: ${{ always() }}
run: ./script/cmake-format --check
- name: Add matching rule
run: echo ::add-matcher::.github/flake8-matcher.json
- name: Run ruff
if: ${{ always() }}
run: |
ruff check .
- name: Run black
if: ${{ always() }}
uses: psf/black@stable