Skip to content

Commit 11f5901

Browse files
Add lint workflow (#51)
* Add lint workflow * Add lint args * Update lint version to 1.29
1 parent 01f9ed0 commit 11f5901

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

.github/workflows/lint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Lint
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
types:
8+
- opened
9+
- reopened
10+
- synchronize
11+
12+
defaults:
13+
run:
14+
shell: bash
15+
16+
env:
17+
GOLANGCI_VERSION: 1.29
18+
GOLANGCI_TIMEOUT: 10m0s
19+
20+
jobs:
21+
22+
lint:
23+
name: Lint
24+
runs-on: ubuntu-18.04
25+
steps:
26+
- name: Checkout Repository
27+
uses: actions/checkout@v2
28+
- name: Lint Code
29+
uses: golangci/golangci-lint-action@v2
30+
with:
31+
version: 'v${{ env.GOLANGCI_VERSION }}'
32+
args: --timeout ${{ env.GOLANGCI_TIMEOUT }} --issues-exit-code=0 ./client/...

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ DOCKER_NGINX_PLUS?=nginx-plus
66
DOCKER_NGINX_PLUS_HELPER?=nginx-plus-helper
77

88
GOLANG_CONTAINER=golang:1.15
9-
GOLANGCI_CONTAINER=golangci/golangci-lint:v1.27-alpine
9+
GOLANGCI_CONTAINER=golangci/golangci-lint:v1.29-alpine
1010

1111
export TEST_API_ENDPOINT=http://$(DOCKER_NGINX_PLUS):8080/api
1212
export TEST_API_ENDPOINT_OF_HELPER=http://$(DOCKER_NGINX_PLUS_HELPER):8080/api

0 commit comments

Comments
 (0)