From b2e99ae7e41cce99f2d996e6fc9b3d83f287102a Mon Sep 17 00:00:00 2001 From: Ben Vincent Date: Mon, 9 Mar 2026 01:22:37 +1100 Subject: [PATCH] feat: migrate to woodpecker ci - update build->test, change to use uvx precommit - update pre-commit with additional checks - remove gitea actions job --- .gitea/workflows/build.yaml | 24 ------------------------ .pre-commit-config.yaml | 22 +++++++++++++++++++--- .woodpecker/pre-commit.yaml | 8 ++++++++ Makefile | 10 ++-------- 4 files changed, 29 insertions(+), 35 deletions(-) delete mode 100644 .gitea/workflows/build.yaml create mode 100644 .woodpecker/pre-commit.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index 8d0a1f7..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Build - -on: - pull_request: - -jobs: - build: - runs-on: almalinux-8 - container: - image: git.query.consul/unkin/almalinux8:latest - options: --privileged - - steps: - - name: Set up environment - run: | - dnf module enable -y nodejs:20 - dnf install -y make bash git nodejs python3.11 - - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run pre-commit - run: | - make build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f48e6d8..a26e3f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,13 +1,29 @@ repos: - - repo: 'https://github.com/adrienverge/yamllint' - rev: v1.32.0 + # General file checks + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.5.0 hooks: - - id: 'yamllint' + - id: check-added-large-files + args: ['--maxkb=500'] + - id: check-merge-conflict + - id: check-symlinks + - id: check-yaml + args: [--allow-multiple-documents] + - id: end-of-file-fixer + - id: forbid-new-submodules + - id: trailing-whitespace + + # YAML linting + - repo: https://github.com/adrienverge/yamllint.git + rev: v1.37.1 + hooks: + - id: yamllint args: [ "-d {extends: relaxed, rules: {line-length: disable}, ignore: chart}", "-s", ] + - repo: https://github.com/jorisroovers/gitlint rev: v0.19.1 hooks: diff --git a/.woodpecker/pre-commit.yaml b/.woodpecker/pre-commit.yaml new file mode 100644 index 0000000..a1938fb --- /dev/null +++ b/.woodpecker/pre-commit.yaml @@ -0,0 +1,8 @@ +when: + - event: pull_request + +steps: + - name: pre-commit + image: git.unkin.net/unkin/almalinux9-base:20260308 + commands: + - make test diff --git a/Makefile b/Makefile index 4815a40..0d05cf0 100644 --- a/Makefile +++ b/Makefile @@ -1,9 +1,3 @@ # run pre-commit -build: - python3.11 -m venv venv - venv/bin/pip install pip --upgrade - venv/bin/pip install pre-commit - venv/bin/pre-commit run --all-files - -clean: - rm -rf venv +test: + uvx pre-commit run --all-files