docs: Merge pull request #22 from StructuralGenomicsConsortium/nabin-… #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: code-check | |
| on: | |
| push: | |
| branches: ["main"] | |
| tags: ["*"] | |
| pull_request: | |
| branches: | |
| - "*" | |
| - "!gh-pages" | |
| jobs: | |
| python-lint-ruff: | |
| name: Python lint [ruff] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout the code | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install the project | |
| run: uv sync --group dev | |
| - name: Lint | |
| run: uv run ruff check . --fix | |
| - name: Format with ruff | |
| run: uv run ruff format . | |
| - name: Check if files were modified | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "❌ Files were reformatted. Please run 'uv run ruff format .' locally and commit the changes." | |
| echo "Files that need formatting:" | |
| git status --porcelain | |
| echo "" | |
| echo "Diff:" | |
| git diff | |
| exit 1 | |
| else | |
| echo "✅ All files are properly formatted" | |
| fi | |
| - name: Type check (if you have mypy) | |
| run: uv run mypy . || echo "Mypy not configured, skipping..." | |
| continue-on-error: true |