File tree Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Expand file tree Collapse file tree 1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change 11name : CI
22
3- ' on ' :
4- - push
3+ on :
4+ push :
5+ pull_request :
56
67jobs :
78 build :
89 runs-on : ubuntu-latest
910
11+ services :
12+ postgres :
13+ image : ankane/pgvector
14+ ports :
15+ - 5445:5432
16+ env :
17+ POSTGRES_USER : myuser
18+ POSTGRES_PASSWORD : mypassword
19+ POSTGRES_DB : mydatabase
20+ options : >-
21+ --health-cmd pg_isready
22+ --health-interval 10s
23+ --health-timeout 5s
24+ --health-retries 5
25+
26+ redis :
27+ image : redis:7
28+ ports :
29+ - 6370:6379
30+
1031 steps :
1132 - name : Checkout code
1233 uses : actions/checkout@v4
@@ -22,10 +43,17 @@ jobs:
2243 pip install -r requirements.txt
2344 pip install black pytest
2445
46+ - name : Wait for Postgres and Redis to be healthy
47+ run : |
48+ sleep 5
49+
2550 - name : Check code formatting with Black
2651 run : |
27- black --check src tests
52+ black --check .
2853
2954 - name : Run tests with pytest
55+ env :
56+ DATABASE_URL : postgresql://myuser:mypassword@localhost:5445/mydatabase
57+ CELERY_BROKER_URL : redis://localhost:6370/0
3058 run : |
3159 PYTHONPATH=src pytest
You can’t perform that action at this time.
0 commit comments