mirror of
https://github.com/fabriziosalmi/caddy-waf.git
synced 2025-12-23 22:27:46 -05:00
refactor(ci): add linter to flow
This commit is contained in:
15
.github/workflows/test.yml
vendored
15
.github/workflows/test.yml
vendored
@@ -10,7 +10,8 @@ on:
|
||||
- main
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
|
||||
|
||||
env:
|
||||
# https://github.com/actions/setup-go/issues/491
|
||||
@@ -33,10 +34,6 @@ jobs:
|
||||
pull-requests: read
|
||||
actions: write # to allow uploading artifacts and cache
|
||||
steps:
|
||||
- name: Harden the runner (Audit all outbound calls)
|
||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
|
||||
with:
|
||||
egress-policy: audit
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
||||
@@ -51,6 +48,12 @@ jobs:
|
||||
run: |
|
||||
go get -v
|
||||
|
||||
- name: Run linter
|
||||
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
|
||||
with:
|
||||
version: latest
|
||||
args: --timeout 5m
|
||||
|
||||
- name: Download MaxMindDB binary
|
||||
run: |
|
||||
wget https://git.io/GeoLite2-Country.mmdb
|
||||
@@ -60,4 +63,4 @@ jobs:
|
||||
# For info about set-output, see https://stackoverflow.com/questions/57850553/github-actions-check-steps-status
|
||||
- name: Run tests
|
||||
run: |
|
||||
go test -v -failfast ./...
|
||||
go test -v -failfast ./... -tags=it
|
||||
|
||||
Reference in New Issue
Block a user