1111
1212jobs :
1313 cypress-run :
14+ runs-on : ubuntu-latest
1415 # Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
1516 # Will still run for each push to bump-meilisearch-v*
1617 if : github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
17- runs-on : ubuntu-latest
18- # Only test on Google Chrome
19- container : cypress/browsers:node12.18.3-chrome87-ff82
18+ services :
19+ meilisearch :
20+ image : getmeili/meilisearch:latest
21+ env :
22+ MEILI_MASTER_KEY : ' masterKey'
23+ MEILI_NO_ANALYTICS : ' true'
24+ ports :
25+ - ' 7700:7700'
2026 steps :
2127 - name : Checkout
22- uses : actions/checkout@v2
23- - name : Cache dependencies
24- uses : actions/cache@v2
25- with :
26- path : |
27- ./node_modules
28- key : ${{ hashFiles('yarn.lock') }}
28+ uses : actions/checkout@v3
2929 - name : Setup node
30- uses : actions/setup-node@v2
30+ uses : actions/setup-node@v3
3131 with :
32- node-version : " 14.x"
33- - name : Download the latest stable version of Meilisearch
34- run : |
35- curl -L https://install.meilisearch.com | sh
36- chmod +x meilisearch
37- - name : Run Meilisearch
38- run : |
39- ./meilisearch --master-key=masterKey --no-analytics &
32+ node-version : 16
33+ cache : yarn
4034 - name : Install dependencies
4135 run : yarn --dev && yarn --cwd ./tests/env/react
4236 - name : Setup Meilisearch Index
4337 run : yarn local:env:setup
4438 - name : Run local browser tests
45- uses : cypress-io/github-action@v2
39+ uses : cypress-io/github-action@v3
4640 with :
41+ wait-on : ' http://localhost:7700'
4742 # Tests are only done on one playground to avoid long testing time
4843 start : yarn local:env:react
4944 env : playground=local
50- - uses : actions/upload-artifact@v2
45+ - uses : actions/upload-artifact@v3
5146 if : failure()
5247 with :
5348 name : cypress-screenshots
5449 path : cypress/screenshots
55- - uses : actions/upload-artifact@v2
50+ - uses : actions/upload-artifact@v3
5651 if : failure()
5752 with :
5853 name : cypress-videos
@@ -62,21 +57,26 @@ jobs:
6257 # Will still run for each push to bump-meilisearch-v*
6358 if : github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
6459 runs-on : ubuntu-latest
60+ services :
61+ meilisearch :
62+ image : getmeili/meilisearch:latest
63+ env :
64+ MEILI_MASTER_KEY : ' masterKey'
65+ MEILI_NO_ANALYTICS : ' true'
66+ ports :
67+ - ' 7700:7700'
6568 strategy :
6669 fail-fast : false
6770 matrix :
68- node : ["12", "14", "16" ]
71+ node : ['14', '16', '18' ]
6972 name : integration-tests (Node.js ${{ matrix.node }})
7073 steps :
71- - uses : actions/checkout@v2
72- - name : Cache dependencies
73- uses : actions/cache@v2
74+ - uses : actions/checkout@v3
75+ - name : Setup node
76+ uses : actions/setup-node@v3
7477 with :
75- path : |
76- ./node_modules
77- key : ${{ hashFiles('yarn.lock') }}
78- - name : Docker setup
79- run : docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key='masterKey'
78+ cache : yarn
79+ node-version : ${{ matrix.node }}
8080 - name : Install dependencies
8181 run : yarn install
8282 - name : Run tests
@@ -91,13 +91,12 @@ jobs:
9191 runs-on : ubuntu-latest
9292
9393 steps :
94- - uses : actions/checkout@v2
95- - name : Cache dependencies
96- uses : actions/cache@v2
94+ - uses : actions/checkout@v3
95+ - name : Setup node
96+ uses : actions/setup-node@v3
9797 with :
98- path : |
99- ./node_modules
100- key : ${{ hashFiles('yarn.lock') }}
98+ node-version : 16
99+ cache : yarn
101100 - name : Install dependencies
102101 run : yarn install
103102 - name : Tests style
@@ -113,15 +112,12 @@ jobs:
113112 runs-on : ubuntu-latest
114113 name : types-check
115114 steps :
116- - uses : actions/checkout@v2
117- - name : Cache dependencies
118- uses : actions/cache@v2
119- with :
120- path : |
121- ./node_modules
122- key : ${{ hashFiles('yarn.lock') }}
115+ - uses : actions/checkout@v3
123116 - name : Setup node
124- uses : actions/setup-node@v2
117+ uses : actions/setup-node@v3
118+ with :
119+ node-version : 16
120+ cache : yarn
125121 - name : Install dependencies
126122 run : yarn --dev
127123 - name : Build project
0 commit comments