Skip to content

Commit 76acd19

Browse files
committed
docs: lot of guides
1 parent 8553e4d commit 76acd19

File tree

5 files changed

+189
-156
lines changed

5 files changed

+189
-156
lines changed

.github/workflows/check.yml

Lines changed: 141 additions & 141 deletions
Original file line numberDiff line numberDiff line change
@@ -200,46 +200,46 @@ jobs:
200200
with:
201201
type: specs
202202

203-
- name: Remove generated clients
204-
if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
205-
run: |
206-
cd clients/algoliasearch-client-javascript/packages
207-
find . -mindepth 1 -maxdepth 1 ! -name 'requester-*' ! -name 'logger-*' ! -name 'client-common' -type d -exec rm -rf {}/src {}/model {}/dist {}/builds \;
203+
# - name: Remove generated clients
204+
# if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
205+
# run: |
206+
# cd clients/algoliasearch-client-javascript/packages
207+
# find . -mindepth 1 -maxdepth 1 ! -name 'requester-*' ! -name 'logger-*' ! -name 'client-common' -type d -exec rm -rf {}/src {}/model {}/dist {}/builds \;
208208

209209
- name: Setup
210210
uses: ./.github/actions/setup
211211
with:
212212
language: javascript
213213
version: ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).version }}
214214

215-
- name: Generate clients
216-
run: yarn cli generate javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
215+
# - name: Generate clients
216+
# run: yarn cli generate javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
217217

218218
- name: Update `yarn.lock` for JavaScript
219219
run: cd clients/algoliasearch-client-javascript && YARN_ENABLE_HARDENED_MODE=0 YARN_ENABLE_IMMUTABLE_INSTALLS=false yarn install
220220

221221
- name: Build clients
222222
run: cd clients/algoliasearch-client-javascript && yarn build
223223

224-
- name: Build the playground
225-
run: yarn cli build playground javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
226-
227-
- name: Build the browser playground
228-
run: yarn workspace javascript-playground-browser build
229-
230-
- name: Run common and requester tests
231-
run: cd clients/algoliasearch-client-javascript && yarn test ${{ !contains(fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun, 'algoliasearch') && '--ignore algoliasearch' || '' }}
232-
233-
- name: Test JavaScript bundle size
234-
if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
235-
run: cd clients/algoliasearch-client-javascript && yarn test:size
236-
237-
- name: Test JavaScript bundle and types
238-
if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
239-
run: cd clients/algoliasearch-client-javascript && yarn test:bundle
240-
241-
- name: Remove previous CTS output
242-
run: rm -rf ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToDelete }}
224+
# - name: Build the playground
225+
# run: yarn cli build playground javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
226+
#
227+
# - name: Build the browser playground
228+
# run: yarn workspace javascript-playground-browser build
229+
#
230+
# - name: Run common and requester tests
231+
# run: cd clients/algoliasearch-client-javascript && yarn test ${{ !contains(fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun, 'algoliasearch') && '--ignore algoliasearch' || '' }}
232+
#
233+
# - name: Test JavaScript bundle size
234+
# if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
235+
# run: cd clients/algoliasearch-client-javascript && yarn test:size
236+
#
237+
# - name: Test JavaScript bundle and types
238+
# if: ${{ startsWith(github.head_ref, 'chore/prepare-release-') }}
239+
# run: cd clients/algoliasearch-client-javascript && yarn test:bundle
240+
#
241+
# - name: Remove previous CTS output
242+
# run: rm -rf ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToDelete }}
243243

244244
- name: Generate CTS
245245
run: yarn cli cts generate javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
@@ -265,30 +265,30 @@ jobs:
265265
- name: Run unit CTS
266266
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-e2e
267267

268-
- name: Run e2e CTS
269-
id: cts-e2e
270-
continue-on-error: true
271-
if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
272-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
273-
274-
- name: Retry e2e CTS
275-
if: ${{ steps.cts-e2e.outcome == 'failure' }}
276-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
277-
278-
- name: Run benchmarks
279-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --benchmark --no-client --no-requests --no-e2e
268+
# - name: Run e2e CTS
269+
# id: cts-e2e
270+
# continue-on-error: true
271+
# if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
272+
# run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
273+
#
274+
# - name: Retry e2e CTS
275+
# if: ${{ steps.cts-e2e.outcome == 'failure' }}
276+
# run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
277+
#
278+
# - name: Run benchmarks
279+
# run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --benchmark --no-client --no-requests --no-e2e
280280

281281
- name: Generate code snippets
282282
run: yarn cli snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
283283

284284
- name: Build the snippets to check validity
285285
run: yarn cli build snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
286286

287-
- name: Generate code guides
288-
run: yarn cli guides javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
289-
290-
- name: Build the guides to check validity
291-
run: yarn cli build guides javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
287+
# - name: Generate code guides
288+
# run: yarn cli guides javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
289+
#
290+
# - name: Build the guides to check validity
291+
# run: yarn cli build guides javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
292292

293293
- name: Zip artifact before storing
294294
run: zip -r -y clients-javascript.zip clients/algoliasearch-client-javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).testsToStore }} ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).guidesToStore }} -x "**/node_modules**" "**/.yarn/cache/**" "**/.yarn/install-state.gz" "**/build/**" "**/dist/**" "**/.gradle/**" "**/bin/**" "**/.nx/**"
@@ -334,75 +334,75 @@ jobs:
334334
language: ${{ matrix.client.language }}
335335
version: ${{ matrix.client.version }}
336336

337-
- name: Generate clients
338-
run: yarn cli generate ${{ matrix.client.language }} ${{ matrix.client.toRun }}
337+
# - name: Generate clients
338+
# run: yarn cli generate ${{ matrix.client.language }} ${{ matrix.client.toRun }}
339339

340340
# no need to build the clients here, it will be done in the Run CTS step anyway.
341341

342342
- name: Update composer.lock
343343
if: ${{ matrix.client.language == 'php' && startsWith(github.head_ref, 'chore/renovateBaseBranch') && matrix.client.isMainVersion }}
344344
run: cd ${{ matrix.client.path }} && composer update
345345

346-
- name: Check for file duplicates in Swift
347-
if: ${{ matrix.client.language == 'swift' && matrix.client.isMainVersion }}
348-
run: |
349-
set -eo pipefail
350-
cd clients/algoliasearch-client-swift
351-
find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d
352-
[ $(find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d | wc -l) -gt 0 ] && echo "Duplicates found" && exit 1 || echo "No duplicate found"
353-
354-
- name: Build the playground
355-
run: yarn cli build playground ${{ matrix.client.language }}
356-
357-
- name: Run Java 'algoliasearch' public API validation
358-
if: ${{ github.base_ref == 'main' && matrix.client.language == 'java' && matrix.client.isMainVersion && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-bc]') }}
359-
run: |
360-
cd ${{ matrix.client.path }}
361-
exit_code=0
362-
./gradlew :api:japicmp || exit_code=$?
363-
364-
FILE=./api/build/reports/japi.txt
365-
366-
if [[ -f "$FILE" ]]; then
367-
cat $FILE
368-
fi
369-
370-
exit $exit_code
371-
372-
- name: Remove previous CTS output
373-
run: rm -rf ${{ matrix.client.testsToDelete }} || true
346+
# - name: Check for file duplicates in Swift
347+
# if: ${{ matrix.client.language == 'swift' && matrix.client.isMainVersion }}
348+
# run: |
349+
# set -eo pipefail
350+
# cd clients/algoliasearch-client-swift
351+
# find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d
352+
# [ $(find Sources -type f | rev | cut -d '/' -f1 | rev | sort | uniq -d | wc -l) -gt 0 ] && echo "Duplicates found" && exit 1 || echo "No duplicate found"
353+
354+
# - name: Build the playground
355+
# run: yarn cli build playground ${{ matrix.client.language }}
356+
357+
# - name: Run Java 'algoliasearch' public API validation
358+
# if: ${{ github.base_ref == 'main' && matrix.client.language == 'java' && matrix.client.isMainVersion && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-bc]') }}
359+
# run: |
360+
# cd ${{ matrix.client.path }}
361+
# exit_code=0
362+
# ./gradlew :api:japicmp || exit_code=$?
363+
#
364+
# FILE=./api/build/reports/japi.txt
365+
#
366+
# if [[ -f "$FILE" ]]; then
367+
# cat $FILE
368+
# fi
369+
#
370+
# exit $exit_code
371+
372+
# - name: Remove previous CTS output
373+
# run: rm -rf ${{ matrix.client.testsToDelete }} || true
374374

375375
- name: Generate CTS
376376
run: yarn cli cts generate ${{ matrix.client.language }} ${{ matrix.client.toRun }} --language-version ${{ matrix.client.version }}
377377

378378
- name: Run unit CTS
379379
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-e2e
380380

381-
- name: Run e2e CTS
382-
id: cts-e2e
383-
continue-on-error: true
384-
if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
385-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
386-
387-
- name: Retry e2e CTS
388-
if: ${{ steps.cts-e2e.outcome == 'failure' }}
389-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
390-
391-
- name: Run benchmarks
392-
if: ${{ matrix.client.isMainVersion }}
393-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --benchmark --no-client --no-requests --no-e2e
381+
# - name: Run e2e CTS
382+
# id: cts-e2e
383+
# continue-on-error: true
384+
# if: ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
385+
# run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
386+
#
387+
# - name: Retry e2e CTS
388+
# if: ${{ steps.cts-e2e.outcome == 'failure' }}
389+
# run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
390+
#
391+
# - name: Run benchmarks
392+
# if: ${{ matrix.client.isMainVersion }}
393+
# run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --benchmark --no-client --no-requests --no-e2e
394394

395395
- name: Generate code snippets
396396
run: yarn cli snippets ${{ matrix.client.language }} ${{ matrix.client.toRun }}
397397

398398
- name: Build the snippets to check validity
399399
run: yarn cli build snippets ${{ matrix.client.language }}
400400

401-
- name: Generate code guides
402-
run: yarn cli guides ${{ matrix.client.language }} ${{ matrix.client.toRun }}
403-
404-
- name: Build the guides to check validity
405-
run: yarn cli build guides ${{ matrix.client.language }}
401+
# - name: Generate code guides
402+
# run: yarn cli guides ${{ matrix.client.language }} ${{ matrix.client.toRun }}
403+
#
404+
# - name: Build the guides to check validity
405+
# run: yarn cli build guides ${{ matrix.client.language }}
406406

407407
- name: Zip artifact before storing
408408
if: ${{ matrix.client.isMainVersion }}
@@ -435,29 +435,29 @@ jobs:
435435
steps:
436436
- uses: actions/checkout@v4
437437

438-
- name: Download specs artifacts
439-
uses: ./scripts/ci/actions/restore-artifacts
440-
with:
441-
type: specs
442-
443-
- name: Setup
444-
uses: ./.github/actions/setup
445-
with:
446-
language: kotlin
447-
version: ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).version }}
448-
449-
- name: Generate clients
450-
run: yarn cli generate kotlin ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).toRun }}
451-
452-
- name: Build clients for macOS
453-
id: build
454-
continue-on-error: true
455-
run: yarn cli build clients kotlin
456-
457-
- name: Retry build
458-
if: ${{ steps.build.outcome == 'failure' }}
459-
run: yarn cli build clients kotlin
460-
438+
# - name: Download specs artifacts
439+
# uses: ./scripts/ci/actions/restore-artifacts
440+
# with:
441+
# type: specs
442+
#
443+
# - name: Setup
444+
# uses: ./.github/actions/setup
445+
# with:
446+
# language: kotlin
447+
# version: ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).version }}
448+
#
449+
# - name: Generate clients
450+
# run: yarn cli generate kotlin ${{ fromJSON(needs.setup.outputs.KOTLIN_DATA).toRun }}
451+
#
452+
# - name: Build clients for macOS
453+
# id: build
454+
# continue-on-error: true
455+
# run: yarn cli build clients kotlin
456+
#
457+
# - name: Retry build
458+
# if: ${{ steps.build.outcome == 'failure' }}
459+
# run: yarn cli build clients kotlin
460+
#
461461
- name: Set output
462462
id: setoutput
463463
run: echo "success=true" >> "$GITHUB_OUTPUT"
@@ -486,33 +486,33 @@ jobs:
486486
- uses: actions/checkout@v4
487487
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
488488

489-
- name: Download specs artifacts
490-
uses: ./scripts/ci/actions/restore-artifacts
491-
with:
492-
type: specs
493-
494-
- name: Setup
495-
uses: ./.github/actions/setup
496-
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
497-
with:
498-
language: swift
499-
version: ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
500-
501-
- name: Generate clients
502-
run: yarn cli generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
503-
504-
- name: Generate tests
505-
run: yarn cli cts generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
506-
507-
- name: Run tests on macOS
508-
id: run-test
509-
if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
510-
continue-on-error: true
511-
run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
512-
513-
- name: Retry tests
514-
if: ${{ steps.run-test.outcome == 'failure' }}
515-
run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
489+
# - name: Download specs artifacts
490+
# uses: ./scripts/ci/actions/restore-artifacts
491+
# with:
492+
# type: specs
493+
#
494+
# - name: Setup
495+
# uses: ./.github/actions/setup
496+
# if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
497+
# with:
498+
# language: swift
499+
# version: ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
500+
#
501+
# - name: Generate clients
502+
# run: yarn cli generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
503+
#
504+
# - name: Generate tests
505+
# run: yarn cli cts generate swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }}
506+
#
507+
# - name: Run tests on macOS
508+
# id: run-test
509+
# if: ${{ env.ALGOLIA_APPLICATION_ID != '' }}
510+
# continue-on-error: true
511+
# run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
512+
#
513+
# - name: Retry tests
514+
# if: ${{ steps.run-test.outcome == 'failure' }}
515+
# run: yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
516516

517517
- name: Set output
518518
id: setoutput

tests/CTS/requests/search/setSettings.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,40 @@
215215
}
216216
}
217217
},
218+
{
219+
"testName": "neuralSearch",
220+
"isSnippet": true,
221+
"parameters": {
222+
"indexName": "theIndexName",
223+
"indexSettings": {
224+
"mode": "neuralSearch"
225+
}
226+
},
227+
"request": {
228+
"path": "/1/indexes/theIndexName/settings",
229+
"method": "PUT",
230+
"body": {
231+
"mode": "neuralSearch"
232+
}
233+
}
234+
},
235+
{
236+
"testName": "keywordSearch",
237+
"isSnippet": true,
238+
"parameters": {
239+
"indexName": "theIndexName",
240+
"indexSettings": {
241+
"mode": "keywordSearch"
242+
}
243+
},
244+
"request": {
245+
"path": "/1/indexes/theIndexName/settings",
246+
"method": "PUT",
247+
"body": {
248+
"mode": "keywordSearch"
249+
}
250+
}
251+
},
218252
{
219253
"testName": "setSettings allow all `indexSettings`",
220254
"parameters": {

0 commit comments

Comments
 (0)