Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
--name typesense \
-v /tmp/typesense-data:/data \
-v /tmp/typesense-analytics-data:/analytics-data \
typesense/typesense:30.0.alpha1 \
typesense/typesense:30.2 \
--api-key=xyz \
--data-dir=/data \
--enable-search-analytics=true \
Expand All @@ -29,6 +29,7 @@ jobs:
with:
php-version: "8.4"
coverage: xdebug
- uses: php-actions/composer@v6
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Run tests
run: vendor/bin/phpunit --coverage-text --testdox
3 changes: 2 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ version: '3.5'

services:
typesense:
image: typesense/typesense:27.0.rc21
image: typesense/typesense:30.2
environment:
TYPESENSE_DATA_DIR: /data
TYPESENSE_API_KEY: xyz
TYPESENSE_ANALYTICS_MINUTE_RATE_LIMIT: 50
volumes:
- /tmp/typesense-server-data:/data
ports:
Expand Down
8 changes: 6 additions & 2 deletions tests/Feature/CurationSetsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ protected function tearDown(): void
public function testCanUpsertACurationSet(): void
{
$this->assertEquals($this->curationSetData['items'][0]['id'], $this->upsertResponse['items'][0]['id']);
$this->assertEquals($this->curationSetData['items'][0]['rule'], $this->upsertResponse['items'][0]['rule']);
// Typesense v30.2+ adds defaults such as stem and synonyms to the rule; compare only the keys we sent.
$rule = $this->curationSetData['items'][0]['rule'];
$this->assertEquals($rule, array_intersect_key($this->upsertResponse['items'][0]['rule'], $rule));
$this->assertEquals($this->curationSetData['items'][0]['includes'], $this->upsertResponse['items'][0]['includes']);
}

Expand All @@ -79,7 +81,9 @@ public function testCanRetrieveASpecificCurationSet(): void
{
$returnData = $this->curationSets['test-curation-set']->retrieve();
$this->assertEquals($this->curationSetData['items'][0]['id'], $returnData['items'][0]['id']);
$this->assertEquals($this->curationSetData['items'][0]['rule'], $returnData['items'][0]['rule']);
// Typesense v30.2+ adds defaults such as stem and synonyms to the rule; compare only the keys we sent.
$rule = $this->curationSetData['items'][0]['rule'];
$this->assertEquals($rule, array_intersect_key($returnData['items'][0]['rule'], $rule));
$this->assertEquals($this->curationSetData['items'][0]['includes'], $returnData['items'][0]['includes']);
}

Expand Down
Loading