File tree Expand file tree Collapse file tree 2 files changed +67
-70
lines changed Expand file tree Collapse file tree 2 files changed +67
-70
lines changed Original file line number Diff line number Diff line change 1+ name : Validate
2+
3+ on :
4+ push :
5+ pull_request :
6+
7+ env :
8+ PIP_DISABLE_PIP_VERSION_CHECK : true
9+ PIP_INDEX_URL : https://mirrors.ustc.edu.cn/pypi/simple
10+ PIP_PROGRESS_BAR : off
11+ PIP_ROOT_USER_ACTION : ignore
12+
13+ jobs :
14+ create-venv :
15+ runs-on : ubuntu-latest
16+ name : Setup Python + uv
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@v4
20+
21+ - name : Set up Python 3.12
22+ uses : actions/setup-python@v5
23+ with :
24+ python-version : 3.12
25+
26+ - name : Install uv and dependencies
27+ run : |
28+ pip install uv
29+ uv venv
30+ uv pip install --group bandit --group mypy --group ruff --group secret
31+ env :
32+ PIP_INDEX_URL : ${{ env.PIP_INDEX_URL }}
33+
34+ - name : Save env variable
35+ run : echo "PYPI_MIRROR=${{ env.PIP_INDEX_URL }}" >> $GITHUB_ENV
36+
37+ bandit :
38+ runs-on : ubuntu-latest
39+ needs : create-venv
40+ steps :
41+ - uses : actions/checkout@v4
42+ - name : Run bandit
43+ run : .venv/bin/bandit -c pyproject.toml -r .
44+
45+ mypy :
46+ runs-on : ubuntu-latest
47+ needs : create-venv
48+ steps :
49+ - uses : actions/checkout@v4
50+ - name : Run mypy
51+ run : .venv/bin/mypy .
52+
53+ ruff :
54+ runs-on : ubuntu-latest
55+ needs : create-venv
56+ steps :
57+ - uses : actions/checkout@v4
58+ - name : Run ruff
59+ run : .venv/bin/ruff check .
60+
61+ secrets :
62+ runs-on : ubuntu-latest
63+ needs : create-venv
64+ steps :
65+ - uses : actions/checkout@v4
66+ - name : Run detect-secrets
67+ run : .venv/bin/detect-secrets-hook --baseline .secrets.baseline
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments