03f977246f
* Bump Version * updated * Bump patch version * Optimization should only occur on single values * Wildcard semantically equivalent to query_string* * Add unit test for optimization * Move code-checks to yml * Add tests path to code-checks * Add lib path for code-checks * Install deps from local * Update DSL optimization unit test --------- Co-authored-by: Terrance DeJesus <99630311+terrancedejesus@users.noreply.github.com>
50 lines
922 B
YAML
50 lines
922 B
YAML
name: Code checks
|
|
|
|
on:
|
|
push:
|
|
branches: [ "main", "7.*", "8.*", "9.*" ]
|
|
pull_request:
|
|
branches: [ "*" ]
|
|
paths:
|
|
- 'detection_rules/**/*.py'
|
|
- 'hunting/**/*.py'
|
|
- 'tests/**/*.py'
|
|
- 'lib/**/*.py'
|
|
|
|
jobs:
|
|
code-checks:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.13'
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip cache purge
|
|
pip install .[dev]
|
|
|
|
- name: Linting check
|
|
run: |
|
|
ruff check --exit-non-zero-on-fix
|
|
|
|
- name: Formatting check
|
|
run: |
|
|
ruff format --check
|
|
|
|
- name: Pyright check
|
|
run: |
|
|
pyright
|
|
|
|
- name: Python License Check
|
|
run: |
|
|
python -m detection_rules dev license-check
|