Skip to content

Commit 1fdfb3e

Browse files
ci: use pixi for CI workflow
- Use setup-pixi action instead of manual setup - Graphviz installed automatically via pixi conda dependency - Testcontainers manages MySQL/MinIO containers automatically - No manual pip install needed, pixi handles dependencies Addresses reviewer feedback on PR #1312. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2100487 commit 1fdfb3e

File tree

1 file changed

+10
-46
lines changed

1 file changed

+10
-46
lines changed

.github/workflows/test.yaml

Lines changed: 10 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
- "src/datajoint/**"
1111
- "tests/**"
1212
- "pyproject.toml"
13-
- "docker-compose.yaml"
13+
- "pixi.lock"
1414
- ".github/workflows/test.yaml"
1515
pull_request:
1616
branches:
@@ -21,69 +21,33 @@ on:
2121
- "src/datajoint/**"
2222
- "tests/**"
2323
- "pyproject.toml"
24-
- "docker-compose.yaml"
24+
- "pixi.lock"
2525
- ".github/workflows/test.yaml"
2626

2727
jobs:
2828
test:
2929
runs-on: ubuntu-latest
30-
strategy:
31-
fail-fast: false
32-
matrix:
33-
py_ver: ["3.10", "3.11", "3.12", "3.13"]
34-
mysql_ver: ["8.0"]
35-
3630
steps:
3731
- uses: actions/checkout@v4
3832

39-
- name: Install system dependencies
40-
run: sudo apt-get update && sudo apt-get install -y graphviz
41-
42-
- name: Start services
43-
run: docker compose up -d db minio --wait
44-
env:
45-
MYSQL_VER: ${{ matrix.mysql_ver }}
46-
47-
- name: Set up Python ${{ matrix.py_ver }}
48-
uses: actions/setup-python@v5
33+
- name: Set up pixi
34+
uses: prefix-dev/setup-pixi@v0.9.3
4935
with:
50-
python-version: ${{ matrix.py_ver }}
51-
52-
- name: Install dependencies
53-
run: pip install -e ".[test]"
36+
cache: true
5437

5538
- name: Run tests
56-
env:
57-
DJ_USE_EXTERNAL_CONTAINERS: "1"
58-
DJ_HOST: 127.0.0.1
59-
DJ_PORT: 3306
60-
DJ_USER: root
61-
DJ_PASS: password
62-
S3_ENDPOINT: 127.0.0.1:9000
63-
S3_ACCESS_KEY: datajoint
64-
S3_SECRET_KEY: datajoint
65-
run: pytest --cov-report term-missing --cov=datajoint tests -v
66-
67-
- name: Stop services
68-
if: always()
69-
run: docker compose down
39+
run: pixi run -e test test-cov
7040

7141
# Unit tests run without containers (faster feedback)
7242
unit-tests:
7343
runs-on: ubuntu-latest
74-
strategy:
75-
matrix:
76-
py_ver: ["3.11"]
7744
steps:
7845
- uses: actions/checkout@v4
7946

80-
- name: Set up Python ${{ matrix.py_ver }}
81-
uses: actions/setup-python@v5
47+
- name: Set up pixi
48+
uses: prefix-dev/setup-pixi@v0.9.3
8249
with:
83-
python-version: ${{ matrix.py_ver }}
84-
85-
- name: Install dependencies
86-
run: pip install -e ".[test]"
50+
cache: true
8751

8852
- name: Run unit tests
89-
run: pytest tests/unit -v
53+
run: pixi run -e test pytest tests/unit -v

0 commit comments

Comments
 (0)