Added golangci to the current GitHub Wokflow

This commit is contained in:
Víctor Zamanillo 2020-09-26 22:15:37 +02:00
parent c52c03e0a8
commit 828a3b8cc2

View File

@ -4,11 +4,33 @@ on:
branches:
- master
pull_request:
jobs:
jobs:
lint:
name: golangci-lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2.2.0
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29
args: --timeout 5m
working-directory: cmd/httpx/
# Optional: working directory, useful for monorepos
# working-directory: somedir
# Optional: golangci-lint command line arguments.
# args: --issues-exit-code=0
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
build:
name: Build
runs-on: ubuntu-latest
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v2
@ -24,4 +46,4 @@ jobs:
- name: Build
run: go build .
working-directory: cmd/httpx/
working-directory: cmd/httpx/