Skip to content

Commit 0ceb3d9

Browse files
committed
ci: add integration testing to ci
1 parent 02aa0eb commit 0ceb3d9

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,25 @@ jobs:
1111
strategy:
1212
matrix:
1313
ruby-version: ['2.7', '3.0', '3.2']
14+
services:
15+
typesense:
16+
image: typesense/typesense:27.1
17+
ports:
18+
- 8108:8108
19+
volumes:
20+
- /tmp/typesense-data:/data
21+
- /tmp/typesense-analytics:/analytics
22+
env:
23+
TYPESENSE_API_KEY: xyz
24+
TYPESENSE_DATA_DIR: /data
25+
TYPESENSE_ENABLE_CORS: true
26+
TYPESENSE_ANALYTICS_DIR: /analytics
27+
TYPESENSE_ENABLE_SEARCH_ANALYTICS: true
1428

1529
steps:
30+
- name: Wait for Typesense
31+
run: |
32+
timeout 20 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8108/health)" != "200" ]]; do sleep 1; done' || false
1633
- uses: actions/checkout@v3
1734
- uses: ruby/setup-ruby@v1
1835
with:

0 commit comments

Comments
 (0)