Skip to content

Commit 2af7d93

Browse files
authored
Add Meilisearch to test suite and remove etag test from brewery endpoint cache control header (#100)
Co-authored-by: Alex Justesen <1144087+alexjustesen@users.noreply.github.com>
1 parent 95e2e3b commit 2af7d93

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

.env.ci

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
APP_NAME="Open Brewery DB API"
2+
APP_KEY=

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,14 @@ jobs:
2424
test-app:
2525
needs: lint-app
2626
runs-on: ubuntu-24.04
27+
services:
28+
meilisearch:
29+
image: getmeili/meilisearch:v1.10
30+
ports:
31+
- 7700:7700
32+
env:
33+
MEILI_MASTER_KEY: masterKey
34+
MEILI_NO_ANALYTICS: true
2735
steps:
2836
- name: Checkout
2937
uses: actions/checkout@v4
@@ -42,13 +50,17 @@ jobs:
4250
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
4351

4452
- name: Copy Environment File
45-
run: cp .env.example .env
53+
run: cp .env.ci .env
4654

4755
- name: Generate App Key
4856
run: php artisan key:generate
4957

5058
- name: Run Tests
5159
run: php artisan test --parallel
60+
env:
61+
SCOUT_DRIVER: meilisearch
62+
MEILISEARCH_HOST: 127.0.0.1:7700
63+
MEILISEARCH_KEY: masterKey
5264

5365
build-image:
5466
# needs: [lint-app, test-app]

tests/Feature/Api/V1/GetBreweryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,4 @@
103103
$cacheControl = $response->headers->get('Cache-Control');
104104
expect($cacheControl)->toContain('public');
105105
expect($cacheControl)->toContain('max-age=');
106-
expect($cacheControl)->toContain('etag');
107106
});

0 commit comments

Comments
 (0)