Skip to content

Commit

Permalink
Add lint workflow (#51)
Browse files Browse the repository at this point in the history
* Add lint workflow

* Add lint args

* Update lint version to 1.29
  • Loading branch information
martialonline committed Oct 21, 2020
1 parent 01f9ed0 commit 11f5901
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Lint

on:
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize

defaults:
run:
shell: bash

env:
GOLANGCI_VERSION: 1.29
GOLANGCI_TIMEOUT: 10m0s

jobs:

lint:
name: Lint
runs-on: ubuntu-18.04
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Lint Code
uses: golangci/golangci-lint-action@v2
with:
version: 'v${{ env.GOLANGCI_VERSION }}'
args: --timeout ${{ env.GOLANGCI_TIMEOUT }} --issues-exit-code=0 ./client/...
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ DOCKER_NGINX_PLUS?=nginx-plus
DOCKER_NGINX_PLUS_HELPER?=nginx-plus-helper

GOLANG_CONTAINER=golang:1.15
GOLANGCI_CONTAINER=golangci/golangci-lint:v1.27-alpine
GOLANGCI_CONTAINER=golangci/golangci-lint:v1.29-alpine

export TEST_API_ENDPOINT=http://$(DOCKER_NGINX_PLUS):8080/api
export TEST_API_ENDPOINT_OF_HELPER=http://$(DOCKER_NGINX_PLUS_HELPER):8080/api
Expand Down

0 comments on commit 11f5901

Please sign in to comment.