Skip to content

waf: fix tests for modsec rules generation (#4385) #8814

waf: fix tests for modsec rules generation (#4385)

waf: fix tests for modsec rules generation (#4385) #8814

name: Go tests (windows)
on:
push:
branches:
- master
- releases/**
paths-ignore:
- "README.md"
pull_request:
branches:
- master
- releases/**
paths-ignore:
- "README.md"
env:
CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF: true
jobs:
build:
name: "Build + tests"
runs-on: windows-2025
steps:
- name: Check out CrowdSec repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
submodules: false
- name: "Set up Go"
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6.3.0
with:
go-version-file: go.mod
- name: Build
run: |
make build BUILD_RE2_WASM=1
- name: Generate codecov configuration
run: |
.github/generate-codecov-yml.sh >> .github/codecov.yml
- name: Unit tests
run: |
go install gotest.tools/gotestsum@v1.12.3
make testcover
- name: Upload unit coverage to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
with:
files: coverage.out
flags: unit-windows
token: ${{ secrets.CODECOV_TOKEN }}
- name: golangci-lint
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
with:
version: v2.10
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false