From 26871a07acbabdfc00286857179448db826c5ae5 Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Sat, 23 Apr 2022 15:49:39 +0700 Subject: [PATCH] Add job to check GDScript format --- .gitattributes | 1 + .github/workflows/main.yml | 12 ++++++++++++ requirements.txt | 4 ++++ 3 files changed, 17 insertions(+) create mode 100644 requirements.txt diff --git a/.gitattributes b/.gitattributes index b0cc757..0e1a2f6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -32,5 +32,6 @@ /misc export-ignore /project.godot export-ignore /README.md export-ignore +/requirements.txt export-ignore /test export-ignore /themes export-ignore diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8838d76..a0fe589 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -311,3 +311,15 @@ jobs: exit 1 fi + check-code-format: + name: 'Check Code Format' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.x + - name: GDFormat Check + run: | + python -m pip install -r requirements.txt + gdformat -c . diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..223338a --- /dev/null +++ b/requirements.txt @@ -0,0 +1,4 @@ +docopt==0.6.2 +gdtoolkit==3.3.1 +lark-parser==0.8.0 +PyYAML==6.0