From c11f08ee0782ee139a069a3240ba0c7032e7c53c Mon Sep 17 00:00:00 2001 From: andrey Date: Fri, 26 Dec 2025 15:55:38 +0300 Subject: [PATCH] update yaml provider (#13) Reviewed-on: https://gitoa.ru/go-4devs/config/pulls/13 --- .gitea/workflows/etcd.yml | 40 +++++++++++++++++++++++++++++++++++++++ provider/etcd/go.mod | 4 ++-- provider/etcd/go.sum | 2 ++ 3 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/etcd.yml diff --git a/.gitea/workflows/etcd.yml b/.gitea/workflows/etcd.yml new file mode 100644 index 0000000..5b011f8 --- /dev/null +++ b/.gitea/workflows/etcd.yml @@ -0,0 +1,40 @@ +name: Go Action + +on: [push, pull_request] + +jobs: + goaction: + runs-on: ubuntu-latest # Use a Gitea Actions runner label + services: + # The label "etcd-server" becomes the hostname for the service. + etcd-server: + # Use the official etcd Docker image + image: quay.io/coreos/etcd:v3.6.7 + env: + ETCD_LISTEN_CLIENT_URLS: http://0.0.0.0:2379 + ETCD_ADVERTISE_CLIENT_URLS: http://etcd-server:2379 + + env: + FDEVS_CONFIG_ETCD_HOST: 'etcd-server:2379' + + steps: + - name: Check out repository code + uses: actions/checkout@v4 # Action to clone the repo + + - name: Set up Go + uses: actions/setup-go@v5 # Action to install a specific Go version + with: + go-version: '1.25.5' # Specify your required Go version + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v8 # Use the golangci-lint action + with: + version: v2.7.2 # Specify the linter version + # Optional: additional arguments + args: --verbose + working-directory: ./provider/etcd + + - name: Run go test + run: go test ./... + working-directory: ./provider/etcd + diff --git a/provider/etcd/go.mod b/provider/etcd/go.mod index b637578..0e0a971 100644 --- a/provider/etcd/go.mod +++ b/provider/etcd/go.mod @@ -1,10 +1,10 @@ module gitoa.ru/go-4devs/config/provider/etcd -go 1.22 +go 1.23 require ( github.com/stretchr/testify v1.8.4 - gitoa.ru/go-4devs/config v0.0.2 + gitoa.ru/go-4devs/config v0.0.3 go.etcd.io/etcd/api/v3 v3.5.11 go.etcd.io/etcd/client/v3 v3.5.11 ) diff --git a/provider/etcd/go.sum b/provider/etcd/go.sum index 4de543d..e4536e2 100644 --- a/provider/etcd/go.sum +++ b/provider/etcd/go.sum @@ -31,6 +31,8 @@ gitoa.ru/go-4devs/config v0.0.1 h1:9KrOO09YbIMO8qL8aVn/G74DurGdOIW5y3O02bays4I= gitoa.ru/go-4devs/config v0.0.1/go.mod h1:xfEC2Al9xnMLJUuekYs3KhJ5BIzWAseNwkMwbN6/xss= gitoa.ru/go-4devs/config v0.0.2 h1:bkTxW57kDDMf4cj/8W7fxPSN7JCPWEqlhCmL6LP3Vzg= gitoa.ru/go-4devs/config v0.0.2/go.mod h1:xfEC2Al9xnMLJUuekYs3KhJ5BIzWAseNwkMwbN6/xss= +gitoa.ru/go-4devs/config v0.0.3 h1:+ecwDQj4fneJCh2uLNNAonm4cUJdGmlfxUsFhQRI9Ko= +gitoa.ru/go-4devs/config v0.0.3/go.mod h1:UINWnObZA0nLiJro+TtavUBBvN0cSt17aRHOk20pP74= go.etcd.io/etcd/api/v3 v3.5.11 h1:B54KwXbWDHyD3XYAwprxNzTe7vlhR69LuBgZnMVvS7E= go.etcd.io/etcd/api/v3 v3.5.11/go.mod h1:Ot+o0SWSyT6uHhA56al1oCED0JImsRiU9Dc26+C2a+4= go.etcd.io/etcd/client/pkg/v3 v3.5.11 h1:bT2xVspdiCj2910T0V+/KHcVKjkUrCZVtk8J2JF2z1A=