From bc59de46fb0645ab4d122515eb6eec6fdee77346 Mon Sep 17 00:00:00 2001 From: Rustem Kamalov Date: Tue, 14 Apr 2026 01:04:32 +0300 Subject: [PATCH] Add CI and integration workflows --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++++ .github/workflows/integration.yml | 27 +++++++++++++++++++++++ cmd/root.go | 2 +- 3 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..e9bf976 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI + +on: + push: + branches: [main, tests] + pull_request: + branches: [main] + +permissions: + contents: read + +jobs: + test-build-lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + cache: true + + - name: Run unit tests + run: go test -race -count=1 ./... + + - name: Run go vet + run: go vet ./... + + - name: Build + run: go build . + + - name: Run golangci-lint + uses: golangci/golangci-lint-action@v6 \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 0000000..4b164df --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,27 @@ +name: Integration Tests + +on: + workflow_dispatch: + +permissions: + contents: read + +jobs: + integration: + runs-on: ubuntu-latest + + env: + OPENSERP_INTEGRATION_TESTS: "1" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Go + uses: actions/setup-go@v5 + with: + go-version: "1.24" + cache: true + + - name: Run integration tests + run: go test -race -count=1 -timeout=120s -tags=integration ./... \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go index 7295a05..4c5a301 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -14,7 +14,7 @@ import ( ) const ( - version = "0.6.0" + version = "0.6.2" defaultConfigFilename = "config" envPrefix = "OPENSERP" )