docs: add community files and templates #3
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Cache pip packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Cache spaCy model | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/spacy | |
| key: ${{ runner.os }}-spacy-en_core_web_lg | |
| restore-keys: | | |
| ${{ runner.os }}-spacy- | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| python -m spacy download en_core_web_lg | |
| - name: Lint with ruff | |
| run: ruff check src/ tests/ | |
| - name: Type check with mypy | |
| run: mypy src/ --ignore-missing-imports | |
| continue-on-error: true | |
| - name: Run tests | |
| run: pytest tests/ -v --tb=short | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install ruff | |
| - name: Check formatting | |
| run: ruff format --check src/ tests/ | |
| - name: Check linting | |
| run: ruff check src/ tests/ |