File tree Expand file tree Collapse file tree 1 file changed +10
-29
lines changed
Expand file tree Collapse file tree 1 file changed +10
-29
lines changed Original file line number Diff line number Diff line change 1010 - " src/datajoint/**"
1111 - " tests/**"
1212 - " pyproject.toml"
13+ - " docker-compose.yaml"
1314 - " .github/workflows/test.yaml"
1415 pull_request :
1516 branches :
2021 - " src/datajoint/**"
2122 - " tests/**"
2223 - " pyproject.toml"
24+ - " docker-compose.yaml"
2325 - " .github/workflows/test.yaml"
2426
2527jobs :
@@ -31,38 +33,13 @@ jobs:
3133 py_ver : ["3.10", "3.11", "3.12", "3.13"]
3234 mysql_ver : ["8.0"]
3335
34- services :
35- mysql :
36- image : mysql:${{ matrix.mysql_ver }}
37- env :
38- MYSQL_ROOT_PASSWORD : password
39- ports :
40- - 3306:3306
41- options : >-
42- --health-cmd="mysqladmin ping -h localhost"
43- --health-interval=10s
44- --health-timeout=5s
45- --health-retries=5
46-
4736 steps :
4837 - uses : actions/checkout@v4
4938
50- - name : Start MinIO
51- run : |
52- docker run -d --name minio \
53- -p 9000:9000 \
54- -e MINIO_ROOT_USER=datajoint \
55- -e MINIO_ROOT_PASSWORD=datajoint \
56- minio/minio:latest server /data
57- # Wait for MinIO to be ready
58- for i in {1..30}; do
59- if curl -sf http://127.0.0.1:9000/minio/health/live; then
60- echo "MinIO is ready"
61- break
62- fi
63- echo "Waiting for MinIO... ($i/30)"
64- sleep 2
65- done
39+ - name : Start services
40+ run : docker compose up -d db minio --wait
41+ env :
42+ MYSQL_VER : ${{ matrix.mysql_ver }}
6643
6744 - name : Set up Python ${{ matrix.py_ver }}
6845 uses : actions/setup-python@v5
8461 S3_SECRET_KEY : datajoint
8562 run : pytest --cov-report term-missing --cov=datajoint tests -v
8663
64+ - name : Stop services
65+ if : always()
66+ run : docker compose down
67+
8768 # Unit tests run without containers (faster feedback)
8869 unit-tests :
8970 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments