diff --git a/.forgejo/workflows/pre-commit.yaml b/.forgejo/workflows/pre-commit.yaml new file mode 100644 index 0000000..1f57f9c --- /dev/null +++ b/.forgejo/workflows/pre-commit.yaml @@ -0,0 +1,15 @@ +on: + - push +jobs: + pre-commit: + runs-on: docker + steps: + - uses: actions/checkout@v4 + + - run: python -m 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