4
0
mirror of https://github.com/nerfstudio-project/nerfstudio.git synced 2026-11-11 02:24:38 +08:00
nerfstudio/.github/workflows/core_code_checks.yml
Frédéric Devernay 83fe2f6cd4
fix core tests (#3687)
* fix core tests

* Try alternative fix for pyright errors

* Run ruff, bump core code checks to 3.11

* Run correct ruff version

* Use the previous pyright version 👀

* cv2 ignore, pin dev dependency to newer pytorch version

* ruff

* Remove pyright error suppressions

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
2025-07-15 16:35:57 -07:00

48 lines
1.2 KiB
YAML

name: Core Tests.
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11.13
uses: actions/setup-python@v4
with:
python-version: '3.11.13'
- uses: actions/cache@v3
with:
path: ${{ env.pythonLocation }}
key: ${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}
- name: Install dependencies
run: |
pip install uv
uv pip install --system --upgrade -e .[dev]
- name: Run license checks
run: |
./nerfstudio/scripts/licensing/license_headers.sh --check
- name: Check notebook cell metadata
run: |
python ./nerfstudio/scripts/docs/add_nb_tags.py --check
- name: Run Ruff Linter
run: |
ruff check docs/ nerfstudio/ tests/ --output-format=github
- name: Run Ruff Formatter
run: |
ruff format docs/ nerfstudio/ tests/ --diff
- name: Run Pyright
run: |
pyright
- name: Test with pytest
run: |
pytest