Skip to content

Commit 828a3b8

Browse files
committed
Added golangci to the current GitHub Wokflow
1 parent c52c03e commit 828a3b8

1 file changed

Lines changed: 26 additions & 4 deletions

File tree

.github/workflows/build.yaml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,33 @@ on:
44
branches:
55
- master
66
pull_request:
7-
8-
jobs:
7+
8+
jobs:
9+
lint:
10+
name: golangci-lint
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v2
15+
- name: Run golangci-lint
16+
uses: golangci/golangci-lint-action@v2.2.0
17+
with:
18+
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
19+
version: v1.29
20+
args: --timeout 5m
21+
working-directory: cmd/httpx/
22+
23+
# Optional: working directory, useful for monorepos
24+
# working-directory: somedir
25+
26+
# Optional: golangci-lint command line arguments.
27+
# args: --issues-exit-code=0
28+
29+
# Optional: show only new issues if it's a pull request. The default value is `false`.
30+
# only-new-issues: true
931
build:
1032
name: Build
11-
runs-on: ubuntu-latest
33+
runs-on: ubuntu-latest
1234
steps:
1335
- name: Set up Go
1436
uses: actions/setup-go@v2
@@ -24,4 +46,4 @@ jobs:
2446

2547
- name: Build
2648
run: go build .
27-
working-directory: cmd/httpx/
49+
working-directory: cmd/httpx/

0 commit comments

Comments
 (0)