File tree Expand file tree Collapse file tree 5 files changed +42
-26
lines changed Expand file tree Collapse file tree 5 files changed +42
-26
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,16 @@ name: Pre-Release Tests
44# Will only run for PRs and pushes to bump-meilisearch-v*
55on :
66 push :
7- branches : bump-meilisearch-v*
7+ branches : [ bump-meilisearch-v*]
88 pull_request :
9- branches : bump-meilisearch-v*
9+ branches : [ bump-meilisearch-v*]
1010
1111jobs :
1212 integration_tests :
1313 runs-on : ubuntu-latest
1414 strategy :
1515 matrix :
16- node : [ '12', '14' ]
16+ node : ["12", "14" ]
1717 name : integration-tests-against-rc (Node.js ${{ matrix.node }})
1818 steps :
1919 - uses : actions/checkout@v2
2424 ./node_modules
2525 key : ${{ hashFiles('yarn.lock') }}
2626 - name : Setup node
27- uses : actions/setup-node@v1
27+ uses : actions/setup-node@v2
2828 with :
2929 node-version : ${{ matrix.node }}
3030 - name : print version
Original file line number Diff line number Diff line change 99 runs-on : ubuntu-latest
1010 steps :
1111 - uses : actions/checkout@v2
12- - uses : actions/setup-node@v1
12+ - uses : actions/setup-node@v2
1313 with :
1414 node-version : 12
1515 registry-url : https://registry.npmjs.org/
Original file line number Diff line number Diff line change 1818 strategy :
1919 fail-fast : false
2020 matrix :
21- node : [ '12', '14' ]
21+ node : ["12", "14" ]
2222 name : integration-tests (Node.js ${{ matrix.node }})
2323 steps :
2424 - uses : actions/checkout@v2
2929 ./node_modules
3030 key : ${{ hashFiles('yarn.lock') }}
3131 - name : Setup node
32- uses : actions/setup-node@v1
32+ uses : actions/setup-node@v2
3333 with :
3434 node-version : ${{ matrix.node }}
3535 - name : print version
6363 ./node_modules
6464 key : ${{ hashFiles('yarn.lock') }}
6565 - name : Setup node
66- uses : actions/setup-node@v1
66+ uses : actions/setup-node@v2
6767 - name : Install dependencies
6868 run : yarn --dev
6969 - name : Run style check
Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html lang ="en ">
3- < head >
4- < meta charset ="utf-8 " />
5- < meta
6- name ="viewport "
7- content ="width=device-width, initial-scale=1, shrink-to-fit=no "
8- />
9- < meta name ="theme-color " content ="#000000 " />
10- </ head >
11- < body >
123
4+ < head >
5+ < meta charset ="utf-8 " />
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1, shrink-to-fit=no " />
7+ < meta name ="theme-color " content ="#000000 " />
8+ </ head >
139
10+ < body >
11+
12+
13+ < h2 class ="errors_title "> Errors:</ h2 >
14+ < div class ="errors "> </ div >
15+
16+ < h2 > Movies index:</ h2 >
17+ < div class ="indexes "> </ div >
18+ < h2 > Search response:</ h2 >
19+ < div class ="hits "> </ div >
20+ < script src ="https://cdn.jsdelivr.net/npm/instantsearch.js@4 "> </ script >
21+ < script src ="/src/app.js "> </ script >
22+ </ body >
1423
15- < script src ="https://cdn.jsdelivr.net/npm/instantsearch.js@4 "> </ script >
16- < script src ="/src/app.js "> </ script >
17- </ body >
1824</ html >
Original file line number Diff line number Diff line change @@ -31,21 +31,31 @@ const addDataset = async () => {
3131}
3232
3333; ( async ( ) => {
34- await addDataset ( )
3534 try {
36- const index = await client . getOrCreateIndex ( 'movies' )
37-
38- const resp = await index . search (
39- 'Moana' ,
35+ await addDataset ( )
36+ const indexes = await client . getIndexes ( )
37+ document . querySelector ( '.indexes' ) . innerText = JSON . stringify (
38+ indexes ,
39+ null ,
40+ 2
41+ )
42+ const resp = await client . index ( uid ) . search (
43+ '' ,
4044 {
41- limit : 1 ,
4245 attributesToHighlight : [ 'title' ] ,
4346 } ,
4447 'POST'
4548 )
4649 console . log ( { resp } )
4750 console . log ( { hit : resp . hits [ 0 ] } )
51+ document . querySelector ( '.hits' ) . innerText = JSON . stringify (
52+ resp . hits ,
53+ null ,
54+ 2
55+ )
56+ document . querySelector ( '.errors_title' ) . style . display = 'none'
4857 } catch ( e ) {
4958 console . error ( e )
59+ document . querySelector ( '.errors' ) . innerText = JSON . stringify ( e , null , 2 )
5060 }
5161} ) ( )
You can’t perform that action at this time.
0 commit comments