-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (67 loc) · 1.74 KB
/
ci.yml
File metadata and controls
73 lines (67 loc) · 1.74 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
name: CI
on:
push:
workflow_call:
env:
MISE_ENV: development
jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to scan all commits
- uses: jdx/mise-action@v3
with:
cache: true
- run: mise gitleaks
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- env:
SECRET_KEY: "${{ secrets.SECRET_KEY_FOR_TESTS }}"
run: mise test
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- run: mise lint
coverage:
needs: [pytest]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
outputs:
badge_url: ${{ steps.upload-coverage-badge-artifact-step.outputs.artifact-url }}
html_report_url: ${{ steps.upload-html-report-artifact-step.outputs.artifact-url }}
steps:
- uses: actions/checkout@v6
- uses: jdx/mise-action@v3
with:
cache: true
- env:
SECRET_KEY: "${{ secrets.SECRET_KEY_FOR_TESTS }}"
COVERAGE_THRESHOLD: 80
run: mise test:coverage
- uses: actions/upload-artifact@v6
id: upload-html-report-artifact-step
if: always()
with:
name: coverage-html
path: htmlcov
retention-days: 10
compression-level: 0
- uses: actions/upload-artifact@v6
id: upload-coverage-badge-artifact-step
if: always()
with:
name: coverage-badge
path: coverage.svg
retention-days: 10
compression-level: 0