Add CI minimal install tests and optional plotting import #54
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
| # Built from: | |
| # https://docs.github.com/en/actions/guides/building-and-testing-python | |
| --- | |
| name: Build and test linkml-store | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened] | |
| workflow_dispatch: | |
| env: | |
| FORCE_COLOR: "1" | |
| jobs: | |
| # Test that core CLI works with minimal dependencies | |
| test-minimal: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4.2.2 | |
| - uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: Install with minimal deps (no extras) | |
| run: uv sync | |
| - name: Test CLI imports and help | |
| run: | | |
| uv run linkml-store --help | |
| uv run python -c "from linkml_store import Client; print('Client import OK')" | |
| - name: Test core functionality (DuckDB, CLI) | |
| run: | | |
| # Run CLI tests (exclude integration tests that need llm/rag) | |
| uv run pytest tests/test_cli.py -v -k "not infer_using_rag" | |
| # Run core API tests with DuckDB only | |
| # Exclude: mongodb, neo4j, ibis, dremio adapters | |
| # Exclude: validation tests (need linkml extra) | |
| uv run pytest tests/test_api/test_api.py tests/test_api/test_filesystem_adapter.py -v \ | |
| -k "duckdb and not validation and not validate" \ | |
| --ignore=tests/test_api/test_mongodb_adapter.py \ | |
| --ignore=tests/test_api/test_neo4j_adapter.py \ | |
| --ignore=tests/test_api/test_ibis_adapter.py \ | |
| --ignore=tests/test_api/test_dremio_adapter.py \ | |
| --ignore=tests/test_api/test_dremio_rest_adapter.py | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| mongodb-version: ['7.0'] | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5.6.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install project | |
| run: uv sync --group dev --all-extras | |
| - name: Check common spelling errors | |
| run: uv run codespell | |
| - name: Start MongoDB | |
| uses: supercharge/mongodb-github-action@1.11.0 | |
| with: | |
| mongodb-version: ${{ matrix.mongodb-version }} | |
| - name: Test with pytest | |
| run: uv run pytest -m "not integration and not neo4j" --ignore=tests/test_api/test_neo4j_adapter.py tests |