Skip to content

Commit

Permalink
drop golangci script in favor of github actions
Browse files Browse the repository at this point in the history
Signed-off-by: cpanato <ctadeu@gmail.com>
  • Loading branch information
cpanato committed May 20, 2023
1 parent ae69080 commit 60f0c5e
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 66 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: golangci-lint

on:
workflow_dispatch:
push:
branches:
- 'main'
pull_request:

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2

- uses: actions/setup-go@fac708d6674e30b6ba41289acaab6d4b75aa0753 # v4.0.1
with:
go-version: '1.20'
check-latest: true

- name: golangci-lint
uses: golangci/golangci-lint-action@08e2f20817b15149a52b5b3ebe7de50aff2ba8c5 # v3.4.0
with:
version: v1.52
args: --timeout=5m
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ verify-published-rpms: ## Ensure rpms have been published

##@ Verify

.PHONY: verify verify-boilerplate verify-build verify-dependencies verify-golangci-lint verify-go-mod
.PHONY: verify verify-boilerplate verify-build verify-dependencies verify-go-mod

verify: release-tools verify-boilerplate verify-build verify-dependencies verify-golangci-lint verify-go-mod ## Runs verification scripts to ensure correct execution
verify: release-tools verify-boilerplate verify-build verify-dependencies verify-go-mod ## Runs verification scripts to ensure correct execution

verify-boilerplate: ## Runs the file header check
./hack/verify-boilerplate.sh
Expand All @@ -49,9 +49,6 @@ verify-dependencies: ## Runs zeitgeist to verify dependency versions
verify-go-mod: ## Runs the go module linter
./hack/verify-go-mod.sh

verify-golangci-lint: ## Runs all golang linters
./hack/verify-golangci-lint.sh

##@ Tests

.PHONY: test
Expand Down
12 changes: 3 additions & 9 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -370,16 +370,10 @@ dependencies:

# golangci-lint-version
- name: "golangci-lint"
version: 1.52.2
version: v1.52
refPaths:
- path: hack/verify-golangci-lint.sh
match: VERSION=v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?

- name: "golangci-lint-checksum"
version: 0e09dedc7e35f511b7924b885e50d7fe48eef25bec78c86f22f5b5abd24976cc
refPaths:
- path: hack/verify-golangci-lint.sh
match: INSTALL_CHECKSUM
- path: .github/workflows/lint.yml
match: "version: v\\d+.\\d+?\\.?(\\d+)?"

# Base images
- name: "Debian: codename (default)"
Expand Down
52 changes: 0 additions & 52 deletions hack/verify-golangci-lint.sh

This file was deleted.

0 comments on commit 60f0c5e

Please sign in to comment.