Skip to content

Commit

Permalink
chore: refactor github workflows and makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
nohehf committed Sep 24, 2024
1 parent e188f75 commit efe17da
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 56 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ jobs:

- name: Check out code
uses: actions/checkout@v3

- name: Setup deps
run: make setup

- name: Go Mod hygine
run: |
Expand Down
39 changes: 0 additions & 39 deletions .github/workflows/lint-report.yaml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Lint report

on:
pull_request:
paths:
- "**.go"
workflow_dispatch:

jobs:
golangci-lint:
name: Lint (golangci-lint)
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
go-version: "1.22"
cache: false
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
File renamed without changes.
17 changes: 0 additions & 17 deletions .github/workflows/report-card.yaml

This file was deleted.

5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
.PHONY: all
all: lint generate pre-build build test

# Install deps
.PHONY: setup
setup:
go install golang.org/x/tools/cmd/stringer@latest

.PHONY: lint
lint:
go run github.com/golangci/golangci-lint/cmd/[email protected] run --fast -- $(go list -f '{{.Dir}}/...' -m)
Expand Down

0 comments on commit efe17da

Please sign in to comment.