No, I say, NO! Top this madness! #155
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Static checks | |
# Based on https://github.com/Scony/godot-gdscript-toolkit/blob/master/action.yml | |
# In theory I could just copy this one: | |
# See https://github.com/lampe-games/godot-open-rts/blob/main/.github/workflows/main.yml | |
# But that pulls from the "released" version, not direct from git master, | |
# and currently I want the lateast as only it supports all Godot 4.2 GDscript features | |
# Also my command lines skips the addons folder which I don't want to format. | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
static-checks: | |
name: 'Static checks' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: create-requirements-if-not-exists | |
run: | | |
if [ ! -f requirements.txt ]; then | |
echo "gdtoolkit==4.*" > requirements.txt | |
fi | |
shell: bash | |
- id: install-python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
cache: "pip" | |
- id: upgrade-setuptools | |
run: pip install --upgrade setuptools | |
shell: bash | |
- id: install-gdtoolkit | |
run: pip install "gdtoolkit==4.*" | |
shell: bash | |
- id: run-gdformat | |
run: find . -name '*.gd' -not -path "./addons/*" -print0 | xargs -0 gdformat --check | |
- id: run-gdlint | |
run: gdlint . |