From e486d3df9882dd81e2cb028ad382256d239f900f Mon Sep 17 00:00:00 2001 From: Julien Riou Date: Mon, 25 Aug 2025 07:10:18 +0200 Subject: [PATCH] test: Add Forgejo actions Fixes #6. Signed-off-by: Julien Riou --- .forgejo/workflows/pre-commit.yaml | 17 +++++++++++++++++ .pre-commit-config.yaml | 8 ++++++++ 2 files changed, 25 insertions(+) create mode 100644 .forgejo/workflows/pre-commit.yaml create mode 100644 .pre-commit-config.yaml diff --git a/.forgejo/workflows/pre-commit.yaml b/.forgejo/workflows/pre-commit.yaml new file mode 100644 index 0000000..49e8ee5 --- /dev/null +++ b/.forgejo/workflows/pre-commit.yaml @@ -0,0 +1,17 @@ +on: + - push +jobs: + pre-commit: + runs-on: docker + steps: + - uses: actions/checkout@v4 + + - run: apt-get update + - run: apt-get -y install python3-pip + - run: pip install pre-commit + + - uses: actions/setup-go@v5 + with: + go-version: '1.24.6' + + - run: pre-commit run --all-files diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..4837297 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,8 @@ +--- +repos: +- repo: https://github.com/tekwizely/pre-commit-golang + rev: v1.0.0-rc.2 + hooks: + - id: go-fmt + - id: go-build-mod + - id: go-test-mod