From b316124df4449a61521079285f5936406dea3c29 Mon Sep 17 00:00:00 2001
From: Markus Pesch <markus.pesch@cryptic.systems>
Date: Tue, 13 May 2025 20:21:51 +0200
Subject: [PATCH] chore(ci): add golangci-linter

---
 .gitea/workflows/golang-tests.yaml  | 38 ++++++++++++++---------------
 .gitea/workflows/golangci-lint.yaml | 26 ++++++++++++++++++++
 2 files changed, 45 insertions(+), 19 deletions(-)
 create mode 100644 .gitea/workflows/golangci-lint.yaml

diff --git a/.gitea/workflows/golang-tests.yaml b/.gitea/workflows/golang-tests.yaml
index 7511899..c46ec77 100644
--- a/.gitea/workflows/golang-tests.yaml
+++ b/.gitea/workflows/golang-tests.yaml
@@ -1,21 +1,21 @@
-# name: Golang Tests
+name: Golang Tests
 
-# on:
-#   pull_request:
-#     types: [ "opened", "reopened", "synchronize" ]
-#   push:
-#     branches: [ '**' ]
-#     tags-ignore: [ '**' ]
+on:
+  pull_request:
+    types: [ "opened", "reopened", "synchronize" ]
+  push:
+    branches: [ '**' ]
+    tags-ignore: [ '**' ]
 
-# jobs:
-#   unittest:
-#     runs-on:
-#     - ubuntu-latest
-#     steps:
-#     - uses: actions/checkout@v4.2.2
-#     - uses: actions/setup-go@v5.5.0
-#       with:
-#         go-version: stable
-#     - env:
-#         GOPROXY: ${{ vars.GOPROXY }}
-#       run: make test/unit
+jobs:
+  unittest:
+    runs-on:
+    - ubuntu-latest
+    steps:
+    - uses: actions/checkout@v4.2.2
+    - uses: actions/setup-go@v5.5.0
+      with:
+        go-version: stable
+    - env:
+        GOPROXY: ${{ vars.GOPROXY }}
+      run: make test/unit
diff --git a/.gitea/workflows/golangci-lint.yaml b/.gitea/workflows/golangci-lint.yaml
new file mode 100644
index 0000000..232f17b
--- /dev/null
+++ b/.gitea/workflows/golangci-lint.yaml
@@ -0,0 +1,26 @@
+name: golangci-lint
+on:
+  push:
+    branches:
+    - master
+  pull_request:
+    types: [ "opened", "reopened", "synchronize" ]
+
+permissions:
+  contents: read
+
+jobs:
+  golangci:
+    strategy:
+      matrix:
+        go: [stable]
+        os: [ubuntu-latest]
+    name: lint
+    runs-on: ${{ matrix.os }}
+    steps:
+      - uses: actions/checkout@v4
+      - uses: actions/setup-go@v5
+        with:
+          go-version: ${{ matrix.go }}
+      - name: golangci-lint
+        uses: golangci/golangci-lint-action@v8
\ No newline at end of file