Skip to content

Commit 3fc359d

Browse files
committed
update optional dependencies and GitHub Actions workflow for testing
1 parent 465ecb0 commit 3fc359d

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

.github/workflows/_test.yml

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,24 @@ jobs:
3030
with:
3131
python-version: ${{ matrix.python-version }}
3232
cache: 'pip'
33-
- uses: actions/cache@v4
34-
with:
35-
path: .venv
36-
key: ${{ runner.os }}-pythonenv-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
37-
restore-keys: |
38-
${{ runner.os }}-pythonenv-${{ matrix.python-version }}-
39-
- name: Setup venv
40-
run: |
41-
python -m venv .venv
42-
- name: Install Python toolchains
33+
34+
- name: Install build dependencies
4335
run: |
44-
source .venv/bin/activate
45-
pip install maturin pytest mypy
36+
python -m pip install --upgrade pip
37+
pip install maturin
38+
4639
- name: Python build
4740
run: |
48-
source .venv/bin/activate
4941
maturin develop
42+
43+
- name: Install test dependencies
44+
run: |
45+
pip install -e ".[test]"
46+
5047
- name: Python type check (mypy)
5148
run: |
52-
source .venv/bin/activate
5349
mypy python
50+
5451
- name: Python tests
5552
run: |
56-
source .venv/bin/activate
5753
pytest python/cocoindex/tests

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ module-name = "cocoindex._engine"
2828
features = ["pyo3/extension-module"]
2929

3030
[project.optional-dependencies]
31-
test = ["pytest"]
32-
dev = ["ruff"]
31+
test = ["pytest", "mypy"]
32+
dev = ["ruff", "mypy"]
3333

3434
[tool.mypy]
3535
python_version = "3.11"

0 commit comments

Comments
 (0)