-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.03 KB
/
format.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
---
name: format
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Globally update npm
run: npm install -g npm
- name: 3rdparty
run: sudo apt-get install -yq clang-14 llvm-14 clang-format-14
- name: Set up Python "3.10"
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install python modules dependencies
run: |
python -m pip install --upgrade pip pipdeptree wheel
pip install -r requirements-linter.txt
- name: formatter
shell: bash
run: |
bash ./.github/scripts/format.sh
- name: Fix formatting
shell: bash
run: |
git add .
if [ -n "$(git diff-index --name-only HEAD --)" ]; \
then \
echo "Please, fix formatting with uploaded patch."
git diff --cached; \
exit 1; \
fi