v0.7 : update to godot 4.4.1 #149
This file contains hidden or 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
| # Workflow to ensure quality of the code. | |
| name: quality-check | |
| on: | |
| [push, pull_request] | |
| jobs: | |
| # Job to automatically lint gdscript code | |
| gdlint: | |
| name: checkstyle gdlint | |
| runs-on: ubuntu-latest | |
| # The allowed amount of linter problems | |
| env: | |
| PROBLEMS_THRESHOLD: 0 | |
| steps: | |
| # Check out the repository | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # Ensure python is installed | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.10" | |
| # Install gdtoolkit | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install 'gdtoolkit==4.*' | |
| # Lint all the code directories (except addons) and capture the output | |
| # "|| true" make sure the github action doesn't stop when there are problems | |
| - name: Lint code | |
| run: | | |
| cd godot | |
| gdlint autoload resources scenes scripts shaders > gdlint_output.txt 2>&1 || true | |
| cat gdlint_output.txt | |
| # Parse the output and compare with the threshold | |
| - name: Check linter results | |
| run: | | |
| cd godot | |
| PROBLEMS=$(grep -oP 'Failure: \K\d+' gdlint_output.txt || echo "0") | |
| echo "Problems found: $PROBLEMS" | |
| echo "Threshold is: $PROBLEMS_THRESHOLD" | |
| if [ "$PROBLEMS" -gt "$PROBLEMS_THRESHOLD" ]; then | |
| echo "Too many linter problems!" | |
| exit 1 | |
| fi |