Merge pull request #97 from raisadz/chore/automate-submodule-and-tests #220
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: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| env: | |
| PY_COLORS: 1 | |
| PYTEST_ADDOPTS: "--numprocesses=logical" | |
| jobs: | |
| pytest: | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pytest-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: | | |
| git submodule update --init --recursive | |
| uv pip install -e narwhals --system | |
| uv pip install -e . --group tests --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pytest | |
| run: python run_tests.py | |
| typing: | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] | |
| os: [ubuntu-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: "true" | |
| cache-suffix: pyright-${{ matrix.python-version }} | |
| cache-dependency-glob: "pyproject.toml" | |
| - name: install-reqs | |
| run: | | |
| git submodule update --init --recursive | |
| uv pip install -e narwhals --system | |
| uv pip install -e . --group typing --system | |
| - name: show-deps | |
| run: uv pip freeze | |
| - name: Run pyright | |
| run: | | |
| pyright narwhals_daft | |
| pyright test_plugin_protocol.py |