Add comprehensive tests for JavaScript detection, passage extraction,… #32
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.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: Lint (ruff) | |
| run: uv run ruff check infomesh/ tests/ | |
| - name: Format check (ruff) | |
| run: uv run ruff format --check . | |
| - name: Type check (mypy) | |
| run: uv run mypy infomesh/ --ignore-missing-imports | |
| continue-on-error: true | |
| - name: Run tests | |
| run: | | |
| uv run pytest tests/ \ | |
| --ignore=tests/test_vector.py \ | |
| --ignore=tests/test_libp2p_spike.py \ | |
| -x -q --tb=short | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Build package | |
| run: uv build | |
| - name: Verify package | |
| run: | | |
| ls -la dist/ | |
| uv run python -m zipfile -l dist/*.whl | head -30 | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ |