File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,38 @@ permissions:
1111 contents : read
1212
1313jobs :
14+ precheck :
15+ runs-on : ubuntu-latest
16+
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ - name : Setup Python
21+ uses : actions/setup-python@v5
22+ with :
23+ python-version : ' 3.12'
24+
25+ - name : Install uv
26+ uses : astral-sh/setup-uv@v3
27+ with :
28+ enable-cache : true
29+ cache-dependency-glob : " uv.lock"
30+
31+ - name : Setup venv and install pip dependencies
32+ run : |
33+ uv venv --python "3.12" \
34+ && uv sync --all-extras \
35+ && uv pip install pip \
36+ && echo "/home/linuxbrew/.linuxbrew/bin" >> "$GITHUB_PATH" \
37+ && if [ -d /nix/var/nix/profiles/default/bin ]; then echo "/nix/var/nix/profiles/default/bin" >> "$GITHUB_PATH"; fi
38+
39+ - name : Run pre-commit checks
40+ run : |
41+ source .venv/bin/activate \
42+ && prek run --all-files
43+
1444 build :
45+ needs : precheck
1546 runs-on : ${{ matrix.os }}
1647 strategy :
1748 fail-fast : true
You can’t perform that action at this time.
0 commit comments