Skip to content

Commit 1a5de57

Browse files
authored
Merge pull request #19 from hashmap-kz/feature/cleancode1
cleancode (ci, makefile, lint)
2 parents 64d8e9d + f24c96e commit 1a5de57

File tree

3 files changed

+40
-9
lines changed

3 files changed

+40
-9
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,6 @@ jobs:
2525
- name: Run integration tests
2626
run: make test-integration
2727

28-
# Note: makefile stages: build/install/kind-setup/test-integration-cmd
29-
- name: Run integration tests for cmd
30-
run: make test-integration-cmd
31-
3228
- name: Run GoReleaser
3329
uses: goreleaser/goreleaser-action@v6
3430
with:

.github/workflows/lint.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- "release/**"
7+
pull_request:
8+
branches:
9+
- master
10+
- "release/**"
11+
types:
12+
- opened
13+
- reopened
14+
- synchronize
15+
- ready_for_review
16+
workflow_dispatch:
17+
18+
jobs:
19+
lint:
20+
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}
21+
runs-on: ubuntu-22.04
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
- uses: actions/setup-go@v5
28+
with:
29+
go-version-file: go.mod
30+
31+
- name: Install golangci-lint
32+
if: runner.os == 'Linux'
33+
uses: golangci/golangci-lint-action@v6
34+
with:
35+
version: v1.62.2
36+
skip-cache: true
37+
38+
- name: Lint
39+
if: runner.os == 'Linux'
40+
run: make lint

Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ kind-teardown:
4747
.PHONY: test-integration
4848
test-integration: install kind-setup
4949
KUBECTL_ENVSUBST_INTEGRATION_TESTS_AVAILABLE=0xcafebabe go test -v integration/*.go
50-
$(MAKE) kind-teardown
51-
52-
# Run integration tests for the 'main' function
53-
.PHONY: test-integration-cmd
54-
test-integration-cmd: install kind-setup
5550
KUBECTL_ENVSUBST_INTEGRATION_TESTS_AVAILABLE=0xcafebabe go test -v cmd/app/*.go
5651
$(MAKE) kind-teardown
5752

0 commit comments

Comments
 (0)