-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (82 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
89 lines (82 loc) · 2.38 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
- run: python -m pip install --upgrade pip "setuptools>=83" && pip install -e ".[dev]"
- run: ruff format --check .
- run: ruff check .
- run: mypy
- run: pytest
- uses: actions/upload-artifact@v7
if: always()
with:
name: coverage
path: coverage.xml
package-and-container:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- run: pip install build
- run: python -m build
- run: docker build --tag logsight-ai:${{ github.sha }} .
- run: docker run --rm logsight-ai:${{ github.sha }} health
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- uses: actions/setup-python@v7
with:
python-version: "3.11"
- run: python -m pip install --upgrade "setuptools>=83" && pip install -e ".[dev]"
- run: bandit -c pyproject.toml -r logsight
- run: pip-audit
- run: pip-licenses --format=json --output-file=licenses.json
- uses: gitleaks/gitleaks-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: anchore/sbom-action@v0
with:
path: .
format: spdx-json
output-file: sbom.spdx.json
- uses: actions/upload-artifact@v7
with:
name: security-inventory
path: |
sbom.spdx.json
licenses.json
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.11"
cache: pip
- run: pip install -e ".[dev]"
- run: mkdir -p benchmarks && pytest tests/test_benchmarks.py --benchmark-only --benchmark-json=benchmarks/latest.json --no-cov
- uses: actions/upload-artifact@v7
with:
name: benchmark-${{ github.sha }}
path: benchmarks/latest.json