File tree 2 files changed +36
-1
lines changed
2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -80,10 +80,44 @@ jobs:
80
80
folder : badges/
81
81
clean : false
82
82
83
+ audit :
84
+ name : Pip Audit
85
+ runs-on : ubuntu-latest
86
+ steps :
87
+ - name : Check out repository
88
+ uses : actions/checkout@v4
89
+ - name : Install UV
90
+ uses : astral-sh/setup-uv@v4
91
+ - name : Set up Python
92
+ uses : actions/setup-python@v5
93
+ with :
94
+ python-version-file : " .python-version"
95
+ - name : Install the project
96
+ run : uv sync --dev
97
+ - name : Generate dependency tree
98
+ run : uv tree
99
+ - name : Generate requirements.txt
100
+ run : |
101
+ uv pip compile pyproject.toml -o requirements.txt
102
+ - name : Pip Audit
103
+ id : audit
104
+ run : uvx pip-audit -r requirements.txt --fix
105
+ - name : Generate Badges
106
+ if : success() || failure()
107
+ run : |
108
+ mkdir -p badges/
109
+ uv run anybadge --overwrite --value="${{ steps.audit.outcome }}" --label=audit --file=badges/audit.svg success=green failure=red
110
+ - name : Publish badges to GitHub Pages
111
+ if : (success() || failure()) && (github.ref_name == github.event.repository.default_branch)
112
+ uses : JamesIves/github-pages-deploy-action@v4
113
+ with :
114
+ folder : badges/
115
+ clean : false
116
+
83
117
pypi-publish :
84
118
name : Upload release to PyPI
85
119
runs-on : ubuntu-latest
86
- needs : [ ruff, pytest ]
120
+ needs : [ ruff, pytest, audit ]
87
121
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
88
122
environment :
89
123
name : pypi
Original file line number Diff line number Diff line change 5
5
[ ![ coverage] ( https://github.com/scottzach1/Python-Injector-Framework/blob/gh-pages/coverage.svg?raw=true )] ( https://github.com/scottzach1/Python-Injector-Framework/ )
6
6
[ ![ pytest] ( https://github.com/scottzach1/Python-Injector-Framework/blob/gh-pages/pytest.svg?raw=true )] ( https://github.com/scottzach1/Python-Injector-Framework/ )
7
7
[ ![ ruff] ( https://github.com/scottzach1/Python-Injector-Framework/blob/gh-pages/ruff.svg?raw=true )] ( https://github.com/scottzach1/Python-Injector-Framework/ )
8
+ [ ![ audit] ( https://github.com/scottzach1/Python-Injector-Framework/blob/gh-pages/audit.svg?raw=true )] ( https://github.com/scottzach1/Python-Injector-Framework/ )
8
9
9
10
A simple Python dependency injection framework.
10
11
You can’t perform that action at this time.
0 commit comments