From b525c82ccbaf7e51fd0ae9c37dd63e55f135f544 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 1 Jun 2025 12:18:46 +0200 Subject: [PATCH] chore(ci): add golangci-lint --- .gitea/workflows/golang-tests.yaml | 24 ++++++++++++++++++++++++ .gitea/workflows/golangci-lint.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .gitea/workflows/golang-tests.yaml create mode 100644 .gitea/workflows/golangci-lint.yaml diff --git a/.gitea/workflows/golang-tests.yaml b/.gitea/workflows/golang-tests.yaml new file mode 100644 index 0000000..413cc33 --- /dev/null +++ b/.gitea/workflows/golang-tests.yaml @@ -0,0 +1,24 @@ +name: Golang Tests + +on: + pull_request: + types: [ "opened", "reopened", "synchronize" ] + push: + branches: [ '**' ] + tags-ignore: [ '**' ] + +jobs: + unittest: + runs-on: ${{ matrix.os }} + strategy: + matrix: + go: [ stable ] + os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ] + steps: + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-go@v5.5.0 + with: + go-version: ${{ matrix.go }} + - 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..3748842 --- /dev/null +++ b/.gitea/workflows/golangci-lint.yaml @@ -0,0 +1,27 @@ +name: Golang CI lint + +on: + pull_request: + types: [ "opened", "reopened", "synchronize" ] + push: + branches: [ '**' ] + tags-ignore: [ '**' ] + +permissions: + contents: read + +jobs: + golangci: + runs-on: ${{ matrix.os }} + strategy: + matrix: + go: [ stable ] + os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ] + steps: + - uses: actions/checkout@v4.2.2 + - uses: actions/setup-go@v5.5.0 + with: + go-version: ${{ matrix.go }} + - uses: golangci/golangci-lint-action@v8.0.0 + with: + version: v2.1 \ No newline at end of file