-
Notifications
You must be signed in to change notification settings - Fork 2
62 lines (49 loc) · 1.9 KB
/
test.yml
File metadata and controls
62 lines (49 loc) · 1.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Tests
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
PYTHONUTF8: "1"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Compile (syntax check)
run: python -m compileall -q bla bla_cli.py setup.py tests
- name: Validate bundled rules
run: python bla_cli.py validate-rules --strict-metadata
- name: Install test dependencies
run: python -m pip install -e ".[dev]"
- name: Run pytest regressions with coverage
run: python -m pytest --cov=bla --cov=bla_cli --cov-report=term-missing
- name: Smoke test Remote Workspace CLI
run: python bla_cli.py ssh --help
- name: Smoke test Remote Collector CLI
run: python bla_cli.py remote-log --help
- name: Smoke test on sample logs
shell: bash
run: |
python bla_cli.py sample_logs/auth.log --no-color --max-alerts 5 --exit-on none
python bla_cli.py sample_logs/access.log --no-color --max-alerts 5 --exit-on none
python bla_cli.py sample_logs/remote_ssh_auth.log --no-color --max-alerts 5 --exit-on none
python bla_cli.py sample_logs/windows_rdp_sample.xml --rdp --no-color --max-alerts 5 --exit-on none
- name: Build package
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
python -m pip install --upgrade build
python -m build