From 2e3b51e3b1ab644ba9f2f7816dda50376aa30e63 Mon Sep 17 00:00:00 2001 From: Rob Kelly Date: Mon, 13 Jan 2025 13:40:15 -0700 Subject: [PATCH] Added CI job for linting --- .gitea/workflows/lint.yaml | 32 ++++++++++++++++++++++++++++++++ .gitea/workflows/publish.yaml | 2 -- 2 files changed, 32 insertions(+), 2 deletions(-) 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/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index 8bfdae4..95154cd 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -4,8 +4,6 @@ run-name: ${{ gitea.actor }} is publishing GFOLF ${{ gitea.ref_name }} to itch.i on: push: - branches: - - ci-test tags: - v*