-
Notifications
You must be signed in to change notification settings - Fork 6
61 lines (47 loc) · 1.59 KB
/
code-quality.yml
File metadata and controls
61 lines (47 loc) · 1.59 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
name: Code Quality
permissions:
contents: read
on:
pull_request:
jobs:
quality:
name: Code Quality (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- arch: amd64
runner: ubuntu-24.04
- arch: arm64
runner: ubuntu-24.04-arm
# Keep deploy-staging.yaml and these steps in sync
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install uv
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: "Set up Python"
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version-file: ".python-version"
- name: Install dependencies
# Needed to be able to compile dependencies on ARM64
env:
DISABLE_NUMCODECS_SSE2: 1
DISABLE_NUMCODECS_AVX2: 1
CFLAGS: "-Wno-implicit-function-declaration"
run: uv sync --all-extras --dev --locked
- name: Install this project
run: "uv pip install -e ."
- name: Run Ruff
run: uv run ruff check --output-format=github
- name: Check code format
run: uv run ruff format --check
- name: Run ty
run: uv run ty check
- name: Run Pytest
run: uv run pytest -p no:sugar --verbose
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@ca46236c6ce584ae24bc6283ba8dcf4b3ec8a066 # v5