File tree Expand file tree Collapse file tree 2 files changed +72
-94
lines changed
Expand file tree Collapse file tree 2 files changed +72
-94
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on : [push]
4+
5+ jobs :
6+ gitleaks :
7+ name : Gitleaks
8+ runs-on : ubuntu-latest
9+ steps :
10+ - uses : actions/checkout@v5
11+ with :
12+ fetch-depth : 0 # Full history is needed to scan all commits
13+ - uses : jdx/mise-action@v3
14+ with :
15+ cache : true
16+ - run : gitleaks detect --verbose --redact
17+
18+ pytest :
19+ name : Pytest
20+ runs-on : ubuntu-latest
21+ steps :
22+ - uses : actions/checkout@v5
23+ - uses : jdx/mise-action@v3
24+ with :
25+ cache : true
26+ - env :
27+ SECRET_KEY : " ${{ secrets.SECRET_KEY_FOR_TESTS }}"
28+ run : make test
29+
30+ ruff :
31+ name : Ruff
32+ runs-on : ubuntu-latest
33+ steps :
34+ - uses : actions/checkout@v5
35+ - uses : jdx/mise-action@v3
36+ with :
37+ cache : true
38+ - run : make lint
39+
40+ coverage :
41+ name : Coverage
42+ needs : [pytest]
43+ runs-on : ubuntu-latest
44+ if : github.ref == 'refs/heads/main'
45+ outputs :
46+ badge_url : ${{ steps.upload-coverage-badge-artifact-step.outputs.artifact-url }}
47+ html_report_url : ${{ steps.upload-html-report-artifact-step.outputs.artifact-url }}
48+ steps :
49+ - uses : actions/checkout@v5
50+ - uses : jdx/mise-action@v3
51+ with :
52+ cache : true
53+ - env :
54+ SECRET_KEY : " ${{ secrets.SECRET_KEY_FOR_TESTS }}"
55+ COVERAGE_THRESHOLD : 80
56+ run : make test-coverage
57+ - uses : actions/upload-artifact@v4
58+ id : upload-html-report-artifact-step
59+ if : always()
60+ with :
61+ name : coverage-html
62+ path : htmlcov
63+ retention-days : 10
64+ compression-level : 0
65+ - uses : actions/upload-artifact@v4
66+ id : upload-coverage-badge-artifact-step
67+ if : always()
68+ with :
69+ name : coverage-badge
70+ path : coverage.svg
71+ retention-days : 10
72+ compression-level : 0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments