-
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (47 loc) · 1.15 KB
/
style-checking.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
name: Style checking
on:
pull_request:
push:
branches:
- develop
- main
jobs:
pre_commit_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout preCICE
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'
check-latest: true
- name: Install pre-commit
run: pip install pre-commit
- name: Run checks
run: pre-commit run -a -v
- name: Git status
if: always()
run: git status
- name: Full diff
if: always()
run: git diff
python_linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.10.10'
- name: "Install style checker"
run: pip install --user black~=22.12
- name: "Run style check"
run: black --check .
cpp_linting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run format check
run: |
sudo apt-get install clang-format-14
./scripts/format/run-clang-format.sh