Skip to content

Commit 364437a

Browse files
ci: add formatting check
Signed-off-by: Anhad Singh <[email protected]>
1 parent d38d971 commit 364437a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
env:
1010
CARGO_TERM_COLOR: always
1111

12+
RED: '\033[1;31m'
13+
NOCOLOR: '\033[0m'
14+
1215
jobs:
1316
build:
1417
runs-on: ubuntu-latest
@@ -24,8 +27,12 @@ jobs:
2427
sudo apt-get install -y nasm meson ninja-build
2528
python3 -m pip install requests xbstrap
2629
sudo ./tools/deps.sh
27-
- name: Build documentation
30+
- name: Build Documentation
2831
run: ./aero.py --document
32+
- name: Formatting Check
33+
run: |
34+
./aero.py --fmt
35+
git diff-index --quiet HEAD -- || (printf "${RED}error${NOCOLOR}: formatting check failed, run \`./aero.py --fmt\`\n" && exit 1)
2936
- name: Deploy documentation
3037
uses: peaceiris/actions-gh-pages@v3
3138
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')

0 commit comments

Comments
 (0)