Skip to content

Commit

Permalink
fix(actions): formatting check
Browse files Browse the repository at this point in the history
Signed-off-by: Anhad Singh <[email protected]>
  • Loading branch information
Andy-Python-Programmer committed Jul 14, 2024
1 parent 85c7cbd commit 27c2eb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,12 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y nasm make
python3 -m pip install requests xbstrap
- name: Build Documentation
run: make doc
- name: Formatting Check
run: |
./aero.py --fmt
git diff-index --quiet HEAD -- || (printf "${RED}error${NOCOLOR}: formatting check failed, run \`./aero.py --fmt\`\n" && exit 1)
make check_fmt
git diff-index --quiet HEAD -- || (printf "${RED}error${NOCOLOR}: formatting check failed, run \`make fmt\`\n" && exit 1)
- name: Deploy documentation
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master' && (github.event_name == 'push' || github.event_name == 'schedule')
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,9 @@ doc:
ifeq ($(open),yes)
xdg-open target/doc/index.html
endif

fmt:
cd $(SOURCE_DIR) && cargo fmt

check_fmt:
cd $(SOURCE_DIR) && cargo fmt -- --check

0 comments on commit 27c2eb1

Please sign in to comment.