From cf4f8744186a343d33b6357905f53fb4108cc282 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Mon, 28 Oct 2024 15:46:09 +0400 Subject: [PATCH] feat: basic tests chore: test bad lint Update build-lint.yml Update build-lint.yml fix linting test build Update client.go --- .github/workflows/build-lint.yml | 28 ++++++++++++++++++++++++++++ client.go | 1 - 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/build-lint.yml diff --git a/.github/workflows/build-lint.yml b/.github/workflows/build-lint.yml new file mode 100644 index 0000000..d834667 --- /dev/null +++ b/.github/workflows/build-lint.yml @@ -0,0 +1,28 @@ +name: Build and Lint + +# Basic concurrency per branch +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + types: [opened, synchronize] + +jobs: + build: + name: Build + runs-on: ubuntu-latest + timeout-minutes: 5 + steps: + - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1 + with: + go-version-file: "go.mod" + cache: false + - run: go mod download + - run: go build -v . + - name: Run linters + uses: golangci/golangci-lint-action@5f1fec7010f6ae3b84ea4f7b2129beb8639b564f # v3.5.0 + with: + version: latest diff --git a/client.go b/client.go index a50ccae..0e4fa8c 100644 --- a/client.go +++ b/client.go @@ -106,7 +106,6 @@ func (c *InfisicalClient) setPlainAccessToken(accessToken string) { func NewInfisicalClient(context context.Context, config Config) InfisicalClientInterface { client := &InfisicalClient{} - setDefaults(&config) client.UpdateConfiguration(config) // set httpClient and config