-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(tooling): setup GitHub actions, add CODEOWNERS and PR template #20
Changes from 6 commits
a2e62fc
459e628
07aeafe
a59eac0
1345338
508eb47
9d2b059
16c597b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Default owners | ||
|
||
- @algolia/data-ingestion |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
## 🧭 What and Why | ||
|
||
🎟 JIRA Ticket: | ||
|
||
### Changes included: | ||
|
||
- List changes | ||
|
||
## 🧪 Test |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: client_javascript | ||
|
||
on: | ||
workflow_run: | ||
workflows: ['specs'] | ||
types: | ||
- completed | ||
|
||
jobs: | ||
build: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you link this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good idea, seems to work this way: https://github.com/actions/setup-node/blob/d08cf222111d5c1d21b3cd4b958937f818d10d9a/docs/advanced-usage.md#node-version-file done in: 9d2b059 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This feature was released just 5 hours ago ! I think the github cache is not updated yet:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you can pin There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
It seems to work now! |
||
cache: 'yarn' | ||
cache-dependency-path: 'yarn.lock' | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Generate search client | ||
run: yarn generate:js:search | ||
|
||
- name: Build search client | ||
run: yarn client:build-js:search | ||
|
||
- name: Generate recommend client | ||
run: yarn generate:js:recommend | ||
|
||
- name: Build recommend client | ||
run: yarn client:build-js:recommend | ||
|
||
- name: Lint | ||
run: yarn prettier --check clients/algoliasearch-client-javascript | ||
|
||
build-failure: | ||
if: ${{ github.event.workflow_run.conclusion == 'failure' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Error on `specs` workflow | ||
run: exit 1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: specs | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '11' | ||
|
||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: 16 | ||
cache: 'yarn' | ||
cache-dependency-path: 'yarn.lock' | ||
|
||
- name: Install Dependencies | ||
run: yarn install | ||
|
||
- name: Build | ||
run: yarn build:spec | ||
|
||
- name: Validate | ||
run: yarn validate | ||
|
||
- name: Lint | ||
run: yarn prettier --check specs |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ yarn-error.log | |
**/node_modules | ||
**/dist | ||
**/.openapi-generator-ignore | ||
**/git_push.sh |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// This is the entrypoint for the package | ||
export * from './client-search/apis'; | ||
export * from './src/apis'; | ||
export * from './model/models'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
export type BaseIndexSettings = { | ||
/** | ||
* Creates replicas, exact copies of an index. | ||
*/ | ||
replicas?: Array<string>; | ||
/** | ||
* Set the maximum number of hits accessible via pagination. | ||
*/ | ||
paginationLimitedTo?: number; | ||
/** | ||
* A list of words for which you want to turn off typo tolerance. | ||
*/ | ||
disableTypoToleranceOnWords?: Array<string>; | ||
/** | ||
* Specify on which attributes to apply transliteration. | ||
*/ | ||
attributesToTransliterate?: Array<string>; | ||
/** | ||
* List of attributes on which to do a decomposition of camel case words. | ||
*/ | ||
camelCaseAttributes?: Array<string>; | ||
/** | ||
* Specify on which attributes in your index Algolia should apply word segmentation, also known as decompounding. | ||
*/ | ||
decompoundedAttributes?: { [key: string]: object }; | ||
/** | ||
* Sets the languages at the index level for language-specific processing such as tokenization and normalization. | ||
*/ | ||
indexLanguages?: Array<string>; | ||
/** | ||
* Whether promoted results should match the filters of the current search, except for geographic filters. | ||
*/ | ||
filterPromotes?: boolean; | ||
/** | ||
* List of attributes on which you want to disable prefix matching. | ||
*/ | ||
disablePrefixOnAttributes?: Array<string>; | ||
/** | ||
* Enables compression of large integer arrays. | ||
*/ | ||
allowCompressionOfIntegerArray?: boolean; | ||
/** | ||
* List of numeric attributes that can be used as numerical filters. | ||
*/ | ||
numericAttributesForFiltering?: Array<string>; | ||
/** | ||
* Lets you store custom data in your indices. | ||
*/ | ||
userData?: { [key: string]: object }; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,134 @@ | ||
export type BaseSearchParams = { | ||
/** | ||
* The text to search in the index. | ||
*/ | ||
query: string; | ||
/** | ||
* Overrides the query parameter and performs a more generic search that can be used to find \"similar\" results. | ||
*/ | ||
similarQuery?: string; | ||
/** | ||
* Filter the query with numeric, facet and/or tag filters. | ||
*/ | ||
filters?: string; | ||
/** | ||
* Filter hits by facet value. | ||
*/ | ||
facetFilters?: Array<string>; | ||
/** | ||
* Create filters for ranking purposes, where records that match the filter are ranked higher, or lower in the case of a negative optional filter. | ||
*/ | ||
optionalFilters?: Array<string>; | ||
/** | ||
* Filter on numeric attributes. | ||
*/ | ||
numericFilters?: Array<string>; | ||
/** | ||
* Filter hits by tags. | ||
*/ | ||
tagFilters?: Array<string>; | ||
/** | ||
* Determines how to calculate the total score for filtering. | ||
*/ | ||
sumOrFiltersScores?: boolean; | ||
/** | ||
* Retrieve facets and their facet values. | ||
*/ | ||
facets?: Array<string>; | ||
/** | ||
* Maximum number of facet values to return for each facet during a regular search. | ||
*/ | ||
maxValuesPerFacet?: number; | ||
/** | ||
* Force faceting to be applied after de-duplication (via the Distinct setting). | ||
*/ | ||
facetingAfterDistinct?: boolean; | ||
/** | ||
* Controls how facet values are fetched. | ||
*/ | ||
sortFacetValuesBy?: string; | ||
/** | ||
* Specify the page to retrieve. | ||
*/ | ||
page?: number; | ||
/** | ||
* Specify the offset of the first hit to return. | ||
*/ | ||
offset?: number; | ||
/** | ||
* Set the number of hits to retrieve (used only with offset). | ||
*/ | ||
length?: number; | ||
/** | ||
* Search for entries around a central geolocation, enabling a geo search within a circular area. | ||
*/ | ||
aroundLatLng?: string; | ||
/** | ||
* Search for entries around a given location automatically computed from the requester’s IP address. | ||
*/ | ||
aroundLatLngViaIP?: boolean; | ||
/** | ||
* Define the maximum radius for a geo search (in meters). | ||
*/ | ||
aroundRadius?: number | string | null; | ||
/** | ||
* Precision of geo search (in meters), to add grouping by geo location to the ranking formula. | ||
*/ | ||
aroundPrecision?: number; | ||
/** | ||
* Minimum radius (in meters) used for a geo search when aroundRadius is not set. | ||
*/ | ||
minimumAroundRadius?: number; | ||
/** | ||
* Search inside a rectangular area (in geo coordinates). | ||
*/ | ||
insideBoundingBox?: Array<number>; | ||
/** | ||
* Search inside a polygon (in geo coordinates). | ||
*/ | ||
insidePolygon?: Array<number>; | ||
/** | ||
* This parameter changes the default values of certain parameters and settings that work best for a natural language query, such as ignorePlurals, removeStopWords, removeWordsIfNoResults, analyticsTags and ruleContexts. These parameters and settings work well together when the query is formatted in natural language instead of keywords, for example when your user performs a voice search. | ||
*/ | ||
naturalLanguages?: Array<string>; | ||
/** | ||
* Enables contextual rules. | ||
*/ | ||
ruleContexts?: Array<string>; | ||
/** | ||
* Define the impact of the Personalization feature. | ||
*/ | ||
personalizationImpact?: number; | ||
/** | ||
* Associates a certain user token with the current search. | ||
*/ | ||
userToken?: string; | ||
/** | ||
* Retrieve detailed ranking information. | ||
*/ | ||
getRankingInfo?: boolean; | ||
/** | ||
* Enable the Click Analytics feature. | ||
*/ | ||
clickAnalytics?: boolean; | ||
/** | ||
* Whether the current query will be taken into account in the Analytics. | ||
*/ | ||
analytics?: boolean; | ||
/** | ||
* List of tags to apply to the query for analytics purposes. | ||
*/ | ||
analyticsTags?: Array<string>; | ||
/** | ||
* Whether to include or exclude a query from the processing-time percentile computation. | ||
*/ | ||
percentileComputation?: boolean; | ||
/** | ||
* Whether this search should participate in running AB tests. | ||
*/ | ||
enableABTest?: boolean; | ||
/** | ||
* Whether this search should use AI Re-Ranking. | ||
*/ | ||
enableReRanking?: boolean; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This job could depend on
specs
because it won't build with invalid spec.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, apparently the
workflow_run
option is only triggered when deployed on the main branch, which seems odd 🤔There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what I remember when I worked on Github Actions, there are a bunch of things that worked only on main and not on prs, this was quite an annoying limitation :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will see once this PR is merged and will fix if it's not the case!