-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Merge pull request #997 from fadyat/single-golangci-version-gh-actions
chore: exclude copy-paste of golangci-lint version
- Loading branch information
Showing
1 changed file
with
5 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |