forked from vacanza/holidays
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.21 KB
/
Copy pathrun-code-checks.yml
File metadata and controls
43 lines (34 loc) · 1.21 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
name: Code checks
on:
workflow_call:
env:
DEFAULT_PYTHON_VERSION: '3.14'
FORCE_COLOR: 1
permissions: {}
jobs:
pre-commit:
name: Run pre-commit
permissions:
contents: read
runs-on: ubuntu-24.04-arm
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
python-version: ${{ env.DEFAULT_PYTHON_VERSION }}
version-file: uv.lock
- name: Install Python
run: uv python install "$UV_PYTHON"
- name: Install CI tools
run: uv sync --frozen --no-default-groups --only-group ci --no-install-project --no-build
- name: Cache pre-commit environments
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
key: pre-commit-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('.pre-commit-config.yaml') }}
path: ~/.cache/pre-commit
- name: Run pre-commit
run: uv run --no-sync --no-build pre-commit run --show-diff-on-failure --color=always --all-files