diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f321b31ba..10a820be5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,26 +26,6 @@ permissions: contents: read jobs: - build: - runs-on: ${{ matrix.platform.runner }} - strategy: - matrix: - platform: - - { os: linux, runner: ubuntu-24.04, target: x86_64, container: "ghcr.io/rust-cross/manylinux_2_28-cross:x86_64" } - - { os: macos, runner: macos-15, target: aarch64 } - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 - with: - python-version: 3.x - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.platform.target }} - args: --release --out dist --find-interpreter - sccache: 'true' - manylinux: auto - container: ${{ matrix.platform.container }} test: name: Run test uses: ./.github/workflows/_test.yml diff --git a/.github/workflows/_test.yml b/.github/workflows/_test.yml index 49247cb7c..715ba6b21 100644 --- a/.github/workflows/_test.yml +++ b/.github/workflows/_test.yml @@ -30,16 +30,28 @@ jobs: with: python-version: ${{ matrix.python-version }} cache: 'pip' + - name: Setup venv + run: | + python -m venv .venv - uses: actions/cache@v4 with: path: .venv key: ${{ runner.os }}-pythonenv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} restore-keys: | ${{ runner.os }}-pythonenv-${{ matrix.python-version }}- - - name: Python build & test + - name: Install Python toolchains + run: | + source .venv/bin/activate + pip install maturin pytest mypy + - name: Python build run: | - python -m venv .venv source .venv/bin/activate - pip install maturin pytest maturin develop + - name: Python type check (mypy) + run: | + source .venv/bin/activate + mypy python + - name: Python tests + run: | + source .venv/bin/activate pytest python/cocoindex/tests \ No newline at end of file