Repository navigation
64 lines (62 loc) · 1.77 KB
/
Copy pathcode_checks.yml
File metadata and controls
64 lines (62 loc) · 1.77 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
name: code checks
on:
push:
branches:
- main
- develop
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- uv.lock
- pyproject.toml
- '**.ipynb'
pull_request:
branches:
- main
- develop
paths:
- .pre-commit-config.yaml
- .github/workflows/code_checks.yml
- '**.py'
- uv.lock
- pyproject.toml
- '**.ipynb'
jobs:
run-code-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
# Install a specific version of uv.
version: "0.5.21"
enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v7
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --dev --prerelease=allow
- name: Install dependencies and check code
run: |
source .venv/bin/activate
pre-commit run --all-files
- name: pip-audit (gh-action-pip-audit)
uses: pypa/gh-action-pip-audit@v1.1.0
with:
virtual-environment: .venv/
# Temporary: ignore pip advisory until fixed in pip>=25.3.
# filelock CVE-2026-1129xx: fixed only in filelock>=4.2.1, which needs
# Python>=3.11. uv.lock uses 4.2.4 on 3.11+, but this job runs on 3.10
# (.python-version), where 4.1.0 is the newest installable release.
# Remove once Python 3.10 support is dropped.
ignore-vulns: >-
GHSA-4xh5-x5gv-qwph
CVE-2026-112906
CVE-2026-112907
CVE-2026-112913
CVE-2026-112914
CVE-2026-112937
CVE-2026-112940