Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: MoTorch Dev

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- name: Set up Python # faster as it uses cached Python version
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"

- name: Install uv
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
version: "0.11.7"
enable-cache: true

- name: Install the project
run: uv sync --locked --all-extras --dev

- name: Check formatting
run: uv run ruff format --check .

- name: Lint
run: uv run ruff check .

- name: Test
run: uv run pytest tests

- name: Build package
run: uv build
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,13 @@ Run the test suite with:
uv run pytest
```

Run linting & formatting with `Ruff`:

```bash
uv run ruff format --check .
uv run ruff check .
```

## References

The implementation is inspired by the following references:
Expand Down