-
Notifications
You must be signed in to change notification settings - Fork 158
48 lines (47 loc) · 1.92 KB
/
Copy pathcode-style.yml
File metadata and controls
48 lines (47 loc) · 1.92 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
name: AUTO code-style
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on:
pull_request:
push:
branches: [dev]
workflow_dispatch:
jobs:
style:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
path: 'src'
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: '3.10'
- name: Run Ruff
# --no-project, like CONTRIBUTING.md tells contributors to run it: ruff reads its config
# from src/pyproject.toml but needs none of the project's 28 dependencies, and --project
# resolved and installed all of them, torch included, to lint.
run: uv run --no-project --with ruff ruff check src
- name: Run the static checks
# test/lint holds the checks that only read files: the bash 3.2 scan over the shipped
# scripts, and the consistency of the declared python version across pyproject.toml, the
# Dockerfile and the workflows. They are style checks, not tests of behaviour, which is why
# they run here rather than in the test workflow.
# --no-project on purpose: none of them needs anything but pytest, so there is no reason to
# resolve FastSurfer's dependencies. They take a few seconds together.
run: uv run --no-project --with pytest pytest -v src/test/lint
- name: Run codespell
uses: codespell-project/actions-codespell@master
with:
check_filenames: true
check_hidden: true
skip: 'src/build,src/doc/images,src/Tutorial,src/.git,src/.mypy_cache,src/.pytest_cache,src/.venv'
ignore_words_file: src/.codespellignore
path: 'src'
# - name: Run pydocstyle
# run: pydocstyle .
# - name: Run bibclean
# run: bibclean-check doc/references.bib