Skip to content

Commit

Permalink
Merge pull request #997 from fadyat/single-golangci-version-gh-actions
Browse files Browse the repository at this point in the history
chore: exclude copy-paste of golangci-lint version
  • Loading branch information
asmyasnikov authored Jan 22, 2024
2 parents 0614d0f + a0c9171 commit a848794
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -6,6 +6,8 @@ on:
- release-*
pull_request:
workflow_dispatch:
env:
GOLANGCI_LINT_VERSION: v1.55.2
jobs:
golangci:
name: golangci-lint
@@ -18,7 +20,7 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
golangci-examples:
name: golangci-lint-examples
@@ -28,14 +30,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: generate examples golangci-lint config
run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/examples/g' .golangci.yml > examples/.golangci.yml

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
working-directory: examples
golangci-slo:
@@ -46,14 +46,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: generate slo golangci-lint config
run: sed 's/github.com\/ydb-platform\/ydb-go-sdk\/v3/slo/g' .golangci.yml > tests/slo/.golangci.yml

- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
working-directory: tests/slo
autoformatter:
@@ -64,19 +62,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Go
uses: actions/setup-go@v3
with:
go-version: "1.21"

- name: Install utilities
run: |
go install mvdan.cc/[email protected]
go install github.com/rinchsan/gosimports/cmd/[email protected]
- name: format all files with auto-formatter
run: bash ./.github/scripts/format-all-go-code.sh "$PWD"

- name: Check repository diff
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"

0 comments on commit a848794

Please sign in to comment.