mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
ci add workflow to check code formatting
This commit is contained in:
parent
3a0069adf8
commit
a2b555e096
24
.github/workflows/check_style.yml
vendored
Normal file
24
.github/workflows/check_style.yml
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
name: Verify code formatting
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
verify-formatting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- name: Install astyle
|
||||
run: |
|
||||
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
|
||||
sudo apt-get update -y -qq
|
||||
sudo apt-get install astyle
|
||||
- name: Format code
|
||||
run: ./code-format.sh
|
||||
working-directory: scripts
|
||||
- name: Check that repository is clean
|
||||
run: git diff --exit-code || (echo "Please apply the preceding diff to your code or run scripts/code-format.sh"; false)
|
Loading…
x
Reference in New Issue
Block a user