diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 53b2e17..55e8919 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,8 +11,25 @@ jobs: strategy: matrix: ruby-version: ['2.7', '3.0', '3.2'] + services: + typesense: + image: typesense/typesense:27.1 + ports: + - 8108:8108 + volumes: + - /tmp/typesense-data:/data + - /tmp/typesense-analytics:/analytics + env: + TYPESENSE_API_KEY: xyz + TYPESENSE_DATA_DIR: /data + TYPESENSE_ENABLE_CORS: true + TYPESENSE_ANALYTICS_DIR: /analytics + TYPESENSE_ENABLE_SEARCH_ANALYTICS: true steps: + - name: Wait for Typesense + run: | + timeout 20 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8108/health)" != "200" ]]; do sleep 1; done' || false - uses: actions/checkout@v3 - uses: ruby/setup-ruby@v1 with: