From 87e5f907f15cd68fab95e58ea44392d4cbcde839 Mon Sep 17 00:00:00 2001 From: Smirnov Oleksandr Date: Thu, 17 Oct 2024 23:06:52 +0300 Subject: [PATCH] chore: refactor ci (#37) * chore(ci): do all go stuff in golang action and only on go changes * refactor(ci): use yaml anchors --- .github/workflows/golang.yml | 12 ++++++++++++ .github/workflows/linter.yml | 17 ----------------- 2 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/linter.yml diff --git a/.github/workflows/golang.yml b/.github/workflows/golang.yml index 1d33fa7..dd46764 100644 --- a/.github/workflows/golang.yml +++ b/.github/workflows/golang.yml @@ -3,7 +3,9 @@ name: golang on: push: branches: [main] + paths: &go_files ["*.go", "go.mod", "go.sum"] pull_request: + paths: *go_files jobs: release: @@ -25,3 +27,13 @@ jobs: - name: e2e tests run: go test -v ./e2e/ + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Golangci Lint + uses: golangci/golangci-lint-action@v6 + with: + version: latest + args: ./... diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml deleted file mode 100644 index 8f6925c..0000000 --- a/.github/workflows/linter.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: linter - -on: - push: - pull_request: - -jobs: - golang: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - name: Golangci Lint - uses: golangci/golangci-lint-action@v6 - with: - version: latest - args: ./...