Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: exclude copy-paste of golangci-lint version #997

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- release-*
pull_request:
workflow_dispatch:
env:
GOLANGCI_LINT_VERSION: v1.55.2
jobs:
golangci:
name: golangci-lint
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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"
Loading