File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ name : code checks
2+ permissions :
3+ contents : read
4+ pull-requests : write
5+
6+ on :
7+ push :
8+ branches :
9+ - main
10+ paths :
11+ - .pre-commit-config.yaml
12+ - .github/workflows/code_checks.yml
13+ - ' **.py'
14+ - uv.lock
15+ - pyproject.toml
16+ - ' **.ipynb'
17+ pull_request :
18+ branches :
19+ - main
20+ paths :
21+ - .pre-commit-config.yaml
22+ - .github/workflows/code_checks.yml
23+ - ' **.py'
24+ - uv.lock
25+ - pyproject.toml
26+ - ' **.ipynb'
27+
28+ jobs :
29+ run-code-check :
30+ runs-on : ubuntu-latest
31+ steps :
32+ 33+
34+ - name : Install uv
35+ uses : astral-sh/setup-uv@0c5e2b8115b80b4c7c5ddf6ffdd634974642d182
36+ with :
37+ # Install a specific version of uv.
38+ version : " 0.5.21"
39+ enable-cache : true
40+
41+ - name : " Set up Python"
42+ uses : actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55
43+ with :
44+ python-version-file : " .python-version"
45+
46+ - name : Install the project
47+ run : uv sync --all-extras --dev
48+
49+ - name : Install dependencies and check code
50+ run : |
51+ source .venv/bin/activate
52+ pre-commit run --all-files
53+
54+ - name : pip-audit (gh-action-pip-audit)
55+ uses : pypa/gh-action-pip-audit@1220774d901786e6f652ae159f7b6bc8fea6d266
56+ with :
57+ virtual-environment : .venv/
You can’t perform that action at this time.
0 commit comments