From f6bf6c0bc074ed1b1ca6803e2f26b9f11fa529a3 Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Mon, 13 Jan 2025 14:57:14 -0700 Subject: [PATCH] Added CI job for linting --- .gitea/workflows/lint.yaml | 32 ++++++++++++++++++++++++++++++++ README.md | 3 +++ 2 files changed, 35 insertions(+) create mode 100644 .gitea/workflows/lint.yaml diff --git a/.gitea/workflows/lint.yaml b/.gitea/workflows/lint.yaml new file mode 100644 index 0000000..c7da050 --- /dev/null +++ b/.gitea/workflows/lint.yaml @@ -0,0 +1,32 @@ +name: linting & formatting +run-name: ${{ gitea.actor }} is checking linting & formatting. + +on: + push: + branches: + - main + - ci-test + tags: + - v* + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + run: | + git init + git remote add origin ${{ gitea.event.repository.clone_url }} + git fetch --depth 1 origin ${{ gitea.ref }} + git checkout FETCH_HEAD + git lfs pull + - name: Setup Python + uses: actions/setup-python@v5.3.0 + with: + python-version: '3.8' + - name: Install gdscript-toolkit + run: pip install -r requirements.txt + - name: Run gdLint + run: gdlint src/ + - name: Check formatting + run: gdformat -c src diff --git a/README.md b/README.md index d07f469..52755f8 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # ${REPO_NAME_TITLE} +![Lint Status](../../../actions/workflows/lint.yaml/badge.svg) +![Publish Status](../../../actions/workflows/publish.yaml/badge.svg) + ${REPO_DESCRIPTION} ## Development