-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (44 loc) · 1.27 KB
/
ci.yml
File metadata and controls
54 lines (44 loc) · 1.27 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
name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Run tests with coverage
run: pytest --cov=esnodepy --cov-report=xml -q
- name: Run mypy
run: mypy esnodepy --ignore-missing-imports
- name: Produce JSON scan (example)
run: python -m esnodepy.cli scan . -o esnode_report.json
- name: Validate JSON report
run: |
python - <<'PY'
import json
from esnodepy.engine.validation import validate_scan_report
data = json.load(open('esnode_report.json'))
validate_scan_report(data)
print('Report schema OK')
PY
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: esnode-report
path: esnode_report.json
- name: Upload coverage xml
uses: actions/upload-artifact@v4
with:
name: coverage-xml
path: coverage.xml