Skip to content

Commit b2cc8f6

Browse files
authored
Merge branch 'main' into feat/add-chopper-requester-package
2 parents 95f4e19 + 793c138 commit b2cc8f6

File tree

612 files changed

+49076
-9663
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

612 files changed

+49076
-9663
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ module.exports = {
6464
'automation-custom/out-of-line-all-of': 'error',
6565
'automation-custom/out-of-line-any-of': 'error',
6666
'automation-custom/valid-acl': 'error',
67+
'automation-custom/ref-common': 'error',
6768
},
6869
},
6970
],

.github/workflows/check.yml

Lines changed: 47 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ jobs:
139139
- name: Test scripts
140140
run: yarn scripts:test
141141

142+
- name: Lint custom eslint plugin
143+
run: yarn workspace eslint-plugin-automation-custom lint
144+
142145
- name: Test custom eslint plugin
143146
run: yarn workspace eslint-plugin-automation-custom test
144147

@@ -210,6 +213,9 @@ jobs:
210213
- name: Build clients
211214
run: ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).buildCommand }}
212215

216+
- name: Build the playground
217+
run: yarn cli build playground javascript
218+
213219
- name: Run common and requester tests
214220
run: cd clients/algoliasearch-client-javascript && yarn test ${{ !contains(fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun, 'algoliasearch') && '--ignore algoliasearch' || '' }}
215221

@@ -242,17 +248,20 @@ jobs:
242248
key: node-modules-tests-${{ hashFiles('tests/output/javascript/yarn.lock') }}
243249

244250
- name: Run unit CTS
245-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-e2e
251+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-e2e
246252

247253
- name: Run e2e CTS
248254
id: cts-e2e
249255
continue-on-error: true
250256
if: ${{ !github.event.pull_request.head.repo.fork }}
251-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-unit
257+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
252258

253259
- name: Retry e2e CTS
254260
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
255-
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --exclude-unit
261+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
262+
263+
- name: Run benchmarks
264+
run: yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --benchmark --no-client --no-requests --no-e2e
256265

257266
- name: Generate code snippets for documentation
258267
run: yarn cli snippets javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }}
@@ -268,7 +277,7 @@ jobs:
268277
path: clients-javascript.zip
269278

270279
client_gen:
271-
timeout-minutes: 20
280+
timeout-minutes: 10
272281
runs-on: ubuntu-22.04
273282
needs:
274283
- setup
@@ -317,6 +326,9 @@ jobs:
317326
- name: Build clients
318327
run: ${{ matrix.client.buildCommand }}
319328

329+
- name: Build the playground
330+
run: yarn cli build playground ${{ matrix.client.language }}
331+
320332
- name: Run Java 'algoliasearch' public API validation
321333
if: ${{ matrix.client.language == 'java' }}
322334
run: |
@@ -336,17 +348,20 @@ jobs:
336348
run: yarn cli cts generate ${{ matrix.client.language }} ${{ matrix.client.toRun }}
337349

338350
- name: Run unit CTS
339-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-e2e
351+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-e2e
340352

341353
- name: Run e2e CTS
342354
id: cts-e2e
343355
continue-on-error: true
344356
if: ${{ !github.event.pull_request.head.repo.fork }}
345-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-unit
357+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
346358

347359
- name: Retry e2e CTS
348360
if: ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
349-
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --exclude-unit
361+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
362+
363+
- name: Run benchmarks
364+
run: yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --benchmark --no-client --no-requests --no-e2e
350365

351366
- name: Generate code snippets for documentation
352367
run: yarn cli snippets ${{ matrix.client.language }} ${{ matrix.client.toRun }}
@@ -474,6 +489,26 @@ jobs:
474489
- name: Generate documentation specs with code snippets
475490
run: yarn cli build specs ${{ fromJSON(needs.setup.outputs.SPECS_MATRIX).toRun }} --docs
476491

492+
- name: Read benchmark results
493+
id: benchmark
494+
run: |
495+
# merge all benchmark results into a single json, and remove the files
496+
results=$(jq -s 'add' -c tests/output/**/benchmarkResult.json)
497+
{
498+
echo 'BENCHMARK_SECTION<<EOF'
499+
echo "<details>"
500+
echo "<summary>📊 Benchmark results</summary>"
501+
echo "" # empty line is required to make the table work
502+
echo "Benchmarks performed on the `search` method using a mock server, the results might not reflect the real-world performance."
503+
# format the json to a markdown table with column "Language" and "rate"
504+
echo "| Language | Rate |"
505+
echo "| :------- | ---: |"
506+
echo "$results" | jq -r 'to_entries | map([.key, .value.rate]) | sort_by(.[1]) | reverse | .[] | @tsv' | awk -F'\t' '{printf "| %-10s | %10d |\n", $1, $2}'
507+
echo "</details>"
508+
echo 'EOF'
509+
} >> "$GITHUB_OUTPUT"
510+
rm -rf tests/output/**/benchmarkResult.json
511+
477512
- name: Push generated code
478513
id: pushGeneratedCode
479514
run: yarn workspace scripts pushGeneratedCode
@@ -491,6 +526,8 @@ jobs:
491526
492527
_If you believe code should've been generated, please, [report the issue](https://github.com/algolia/api-clients-automation/issues/new?assignees=&labels=bug%2Ctriage&projects=&template=Bug_report.yml&title=%5Bbug%5D%3A+)._
493528
529+
${{ steps.benchmark.outputs.BENCHMARK_SECTION }}
530+
494531
- name: update generation comment
495532
uses: marocchino/sticky-pull-request-comment@v2
496533
if: ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT != '' }}
@@ -504,7 +541,9 @@ jobs:
504541
| 🪓 Triggered by | [`${{ github.sha }}`](${{ github.event.pull_request.base.repo.html_url }}/commit/${{ github.sha }}) |
505542
| 🍃 Generated commit | [`${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}`](${{ github.event.pull_request.base.repo.html_url }}/commit/${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT }}) |
506543
| 🌲 Generated branch | [`generated/${{ github.head_ref }}`](${{ github.event.pull_request.base.repo.html_url }}/tree/generated/${{ github.head_ref }}) |
507-
544+
545+
${{ steps.benchmark.outputs.BENCHMARK_SECTION }}
546+
508547
- name: Build website
509548
if: ${{ github.ref == 'refs/heads/main' || github.base_ref == 'main' }}
510549
run: yarn website:build

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ pom.xml
2525
dist
2626
.cache
2727

28+
benchmarkResult.json
29+
2830
**.openapi-generator
2931
/openapitools.json
3032
**/.openapi-generator-ignore

clients/algoliasearch-client-csharp/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## [7.0.0-beta.11](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.10...7.0.0-beta.11)
2+
3+
- [3ec5f5f7e](https://github.com/algolia/api-clients-automation/commit/3ec5f5f7e) feat(specs): add v2 endpoints for ingestion ([#3416](https://github.com/algolia/api-clients-automation/pull/3416)) by [@shortcuts](https://github.com/shortcuts/)
4+
- [200f07e9c](https://github.com/algolia/api-clients-automation/commit/200f07e9c) fix(specs): add primary to get settings response ([#3415](https://github.com/algolia/api-clients-automation/pull/3415)) by [@kai687](https://github.com/kai687/)
5+
- [81c15cf5b](https://github.com/algolia/api-clients-automation/commit/81c15cf5b) chore(specs): add eslint rule to avoid cross-references ([#3413](https://github.com/algolia/api-clients-automation/pull/3413)) by [@millotp](https://github.com/millotp/)
6+
- [be060a060](https://github.com/algolia/api-clients-automation/commit/be060a060) fix(specs): remove cross-references of analytics ([#3414](https://github.com/algolia/api-clients-automation/pull/3414)) by [@millotp](https://github.com/millotp/)
7+
- [fe6f5edab](https://github.com/algolia/api-clients-automation/commit/fe6f5edab) feat(specs): add v2 endpoints for ingestion ([#3410](https://github.com/algolia/api-clients-automation/pull/3410)) by [@shortcuts](https://github.com/shortcuts/)
8+
- [e3c6b8401](https://github.com/algolia/api-clients-automation/commit/e3c6b8401) fix(specs): remove cross-specs references ([#3412](https://github.com/algolia/api-clients-automation/pull/3412)) by [@shortcuts](https://github.com/shortcuts/)
9+
110
## [7.0.0-beta.10](https://github.com/algolia/algoliasearch-client-csharp/compare/7.0.0-beta.9...7.0.0-beta.10)
211

312
- [280037178](https://github.com/algolia/api-clients-automation/commit/280037178) fix(specs): update shopify feature flags ([#3380](https://github.com/algolia/api-clients-automation/pull/3380)) by [@millotp](https://github.com/millotp/)

clients/algoliasearch-client-csharp/algoliasearch/Algolia.Search.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<RepositoryType>git</RepositoryType>
2222
<RequireLicenseAcceptance>false</RequireLicenseAcceptance>
2323
<Copyright>Copyright 2019 Algolia</Copyright>
24-
<Version>7.0.0-beta.10</Version>
24+
<Version>7.0.0-beta.11</Version>
2525
<GenerateDocumentationFile>true</GenerateDocumentationFile>
2626
<TargetFrameworks>netstandard2.1;netstandard2.0</TargetFrameworks>
2727
<IncludeSymbols>true</IncludeSymbols>

0 commit comments

Comments
 (0)