diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..5b70370 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,57 @@ +name: Godot CI + +on: + push: + branches: [main] + + pull_request: + branches: [main] + + workflow_dispatch: + +concurrency: + group: ci-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + lint-and-format: + runs-on: ubuntu-latest + timeout-minutes: 10 # The overall timeout + + steps: + - uses: actions/checkout@v4 + + - name: Install GDScript Toolkit + run: | + pip install gdtoolkit + + - name: Lint + run: | + gdlint . + + - name: Format Check + run: | + gdformat --check . + + unit-test: + runs-on: ubuntu-latest + timeout-minutes: 10 # The overall timeout + permissions: + actions: write + checks: write + contents: write + pull-requests: write + statuses: write + + steps: + - uses: actions/checkout@v4 + with: + lfs: true + + - uses: MikeSchulze/gdUnit4-action@v1.1.1 + with: + godot-version: "4.3" + paths: | + res://tests/ + timeout: 5 + report-name: test_report.xml diff --git a/.vscode/settings.json b/.vscode/settings.json index 3b5958e..21e4564 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,6 +1,6 @@ { "editor.tabSize": 4, - "editor.insertSpaces": false, + // "editor.insertSpaces": false, "files.trimTrailingWhitespace": true, "files.insertFinalNewline": true, "files.trimFinalNewlines": true,