Skip to content

Commit

Permalink
merge from master (dc28ae5) for 1.6.5 (#3444)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmetc authored Feb 5, 2025
1 parent 523164f commit c7ef2a9
Show file tree
Hide file tree
Showing 344 changed files with 10,732 additions and 7,624 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bats-hub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: "Install bats dependencies"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bats-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: "Install bats dependencies"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bats-postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: "Install bats dependencies"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bats-sqlite-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: "Install bats dependencies"
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-windows-build-msi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: Build
run: make windows_installer BUILD_RE2_WASM=1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod
cache-dependency-path: "**/go.sum"

# Initializes the CodeQL tools for scanning.
Expand Down
32 changes: 17 additions & 15 deletions .github/workflows/docker-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,30 @@ jobs:
cache-from: type=gha
cache-to: type=gha,mode=min

- name: "Setup Python"
- name: "Create Docker network"
run: docker network create net-test

- name: Install uv
uses: astral-sh/setup-uv@v5
with:
version: 0.5.24
enable-cache: true
cache-dependency-glob: "uv.lock"

- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.x"
cache: 'pipenv'
python-version-file: "./docker/test/.python-version"

- name: "Install dependencies"
# running serially to reduce test flakiness
- name: Lint and run the tests
run: |
cd docker/test
python -m pip install --upgrade pipenv wheel
pipenv install --deploy
- name: "Create Docker network"
run: docker network create net-test

- name: "Run tests"
uv sync --all-extras --dev --locked
uv run ruff check
uv run pytest tests -n 1 --durations=0 --color=yes
env:
CROWDSEC_TEST_VERSION: test
CROWDSEC_TEST_FLAVORS: ${{ matrix.flavor }}
CROWDSEC_TEST_NETWORK: net-test
CROWDSEC_TEST_TIMEOUT: 90
# running serially to reduce test flakiness
run: |
cd docker/test
pipenv run pytest -n 1 --durations=0 --color=yes
4 changes: 2 additions & 2 deletions .github/workflows/go-tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: Build
run: |
Expand All @@ -61,6 +61,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
version: v1.63
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false
20 changes: 15 additions & 5 deletions .github/workflows/go-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ jobs:
DEBUG: ""
LAMBDA_EXECUTOR: ""
KINESIS_ERROR_PROBABILITY: ""
DOCKER_HOST: unix:///var/run/docker.sock
KINESIS_INITIALIZE_STREAMS: ${{ env.KINESIS_INITIALIZE_STREAMS }}
LOCALSTACK_HOST: ${{ env.AWS_HOST }} # Required so that resource urls are provided properly
# e.g sqs url will get localhost if we don't set this env to map our service
Expand Down Expand Up @@ -115,6 +114,17 @@ jobs:
--health-retries 5
--health-start-period 30s
victorialogs:
image: victoriametrics/victoria-logs:v1.5.0-victorialogs
ports:
- "9428:9428"
options: >-
--name=victorialogs1
--health-cmd "wget -q -O - http://0.0.0.0:9428"
--health-interval 30s
--health-timeout 10s
--health-retries 5
--health-start-period 30s
steps:

- name: Check out CrowdSec repository
Expand All @@ -126,7 +136,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: Run "go generate" and check for changes
run: |
Expand All @@ -144,11 +154,11 @@ jobs:
go generate ./...
protoc --version
if [[ $(git status --porcelain) ]]; then
echo "Error: Uncommitted changes found after running 'make generate'. Please commit all generated code."
echo "Error: Uncommitted changes found after running 'go generate'. Please commit all generated code."
git diff
exit 1
else
echo "No changes detected after running 'make generate'."
echo "No changes detected after running 'go generate'."
fi
- name: Create localstack streams
Expand Down Expand Up @@ -190,6 +200,6 @@ jobs:
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.61
version: v1.63
args: --issues-exit-code=1 --timeout 10m
only-new-issues: false
2 changes: 1 addition & 1 deletion .github/workflows/publish-tarball-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: "Set up Go"
uses: actions/setup-go@v5
with:
go-version: "1.23"
go-version-file: go.mod

- name: Build the binaries
run: |
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
# Test dependencies
test/tools/*

# Saved test status
test/bats/.bats/run-logs

# VMs used for dev/test

.vagrant
Expand Down
Loading

0 comments on commit c7ef2a9

Please sign in to comment.