Skip to content

Commit 03086c1

Browse files
Merge #812
812: Update CI to latest versions of dependencies r=bidoubiwa a=bidoubiwa - Add node 18 compatibility - Add possibility to change meilisearch version in Cypress CI - Use context for the meilisearch version - Update all github actions to their latest version Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents cb88c64 + 90305fb commit 03086c1

File tree

7 files changed

+135
-178
lines changed

7 files changed

+135
-178
lines changed

.github/workflows/beta-tests.yml

Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
outputs:
1515
docker-version: ${{ steps.grep-step.outputs.version }}
1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1818
- name: Grep docker beta version of Meilisearch
1919
id: grep-step
2020
run: |
@@ -25,38 +25,39 @@ jobs:
2525
runs-on: ubuntu-latest
2626
needs: ['grep-docker-version']
2727
# Only test on Google Chrome
28-
container: cypress/browsers:node12.18.3-chrome87-ff82
28+
services:
29+
meilisearch:
30+
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
31+
env:
32+
MEILI_MASTER_KEY: 'masterKey'
33+
MEILI_NO_ANALYTICS: 'true'
34+
ports:
35+
- '7700:7700'
2936
steps:
3037
- name: Checkout
31-
uses: actions/checkout@v2
32-
- name: Cache dependencies
33-
uses: actions/cache@v2
34-
with:
35-
path: |
36-
./node_modules
37-
key: ${{ hashFiles('yarn.lock') }}
38+
uses: actions/checkout@v3
3839
- name: Setup node
39-
uses: actions/setup-node@v2
40+
uses: actions/setup-node@v3
4041
with:
41-
node-version: '14.x'
42-
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
43-
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }} meilisearch --master-key=masterKey --no-analytics
42+
node-version: 16
43+
cache: yarn
4444
- name: Install dependencies
4545
run: yarn --dev && yarn --cwd ./tests/env/react
4646
- name: Setup Meilisearch Index
4747
run: yarn local:env:setup
4848
- name: Run local browser tests
49-
uses: cypress-io/github-action@v2
49+
uses: cypress-io/github-action@v3
5050
with:
51+
wait-on: 'http://localhost:7700'
5152
# Tests are only done on one playground to avoid long testing time
5253
start: yarn local:env:react
5354
env: playground=local
54-
- uses: actions/upload-artifact@v2
55+
- uses: actions/upload-artifact@v3
5556
if: failure()
5657
with:
5758
name: cypress-screenshots
5859
path: cypress/screenshots
59-
- uses: actions/upload-artifact@v2
60+
- uses: actions/upload-artifact@v3
6061
if: failure()
6162
with:
6263
name: cypress-videos
@@ -65,21 +66,29 @@ jobs:
6566
tests:
6667
runs-on: ubuntu-latest
6768
needs: ['grep-docker-version']
69+
services:
70+
meilisearch:
71+
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
72+
env:
73+
MEILI_MASTER_KEY: 'masterKey'
74+
MEILI_NO_ANALYTICS: 'true'
75+
ports:
76+
- '7700:7700'
6877
strategy:
6978
fail-fast: false
7079
matrix:
71-
node: ['12', '14', '16']
80+
node: ['14', '16', '18']
7281
name: integration-tests (Node.js ${{ matrix.node }})
7382
steps:
74-
- uses: actions/checkout@v2
83+
- uses: actions/checkout@v3
7584
- name: Cache dependencies
7685
uses: actions/cache@v2
7786
with:
7887
path: |
7988
./node_modules
8089
key: ${{ hashFiles('yarn.lock') }}
8190
- name: Setup node
82-
uses: actions/setup-node@v2
91+
uses: actions/setup-node@v3
8392
with:
8493
node-version: '14.x'
8594
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker

.github/workflows/pre-release-tests.yml

Lines changed: 13 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,14 @@ on:
1111
jobs:
1212
cypress-run:
1313
runs-on: ubuntu-latest
14-
# Only test on Google Chrome
15-
container: cypress/browsers:node12.18.3-chrome87-ff82
1614
steps:
1715
- name: Checkout
18-
uses: actions/checkout@v2
19-
- name: Cache dependencies
20-
uses: actions/cache@v2
21-
with:
22-
path: |
23-
./node_modules
24-
key: ${{ hashFiles('yarn.lock') }}
16+
uses: actions/checkout@v3
2517
- name: Setup node
26-
uses: actions/setup-node@v2
18+
uses: actions/setup-node@v3
2719
with:
28-
node-version: "14.x"
20+
node-version: 16
21+
cache: yarn
2922
- name: Install dependencies
3023
run: yarn --dev && yarn --cwd ./tests/env/react
3124
- name: Grep latest version of Meilisearch
@@ -43,15 +36,16 @@ jobs:
4336
- name: Run local browser tests
4437
uses: cypress-io/github-action@v2
4538
with:
39+
wait-on: 'http://localhost:7700'
4640
# Tests are only done on one playground to avoid long testing time
4741
start: yarn local:env:react
4842
env: playground=local
49-
- uses: actions/upload-artifact@v2
43+
- uses: actions/upload-artifact@v3
5044
if: failure()
5145
with:
5246
name: cypress-screenshots
5347
path: cypress/screenshots
54-
- uses: actions/upload-artifact@v2
48+
- uses: actions/upload-artifact@v3
5549
if: failure()
5650
with:
5751
name: cypress-videos
@@ -62,16 +56,15 @@ jobs:
6256
strategy:
6357
fail-fast: false
6458
matrix:
65-
node: ["12", "14", "16"]
59+
node: ['14', '16', '18']
6660
name: integration-tests (Node.js ${{ matrix.node }})
6761
steps:
68-
- uses: actions/checkout@v2
69-
- name: Cache dependencies
70-
uses: actions/cache@v2
62+
- uses: actions/checkout@v3
63+
- name: Setup node
64+
uses: actions/setup-node@v3
7165
with:
72-
path: |
73-
./node_modules
74-
key: ${{ hashFiles('yarn.lock') }}
66+
cache: yarn
67+
node-version: ${{ matrix.node }}
7568
- name: Get the latest Meilisearch RC
7669
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
7770
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
@@ -82,43 +75,3 @@ jobs:
8275
run: yarn test
8376
- name: Build project
8477
run: yarn build
85-
86-
style:
87-
name: style-check
88-
runs-on: ubuntu-latest
89-
90-
steps:
91-
- uses: actions/checkout@v2
92-
- name: Cache dependencies
93-
uses: actions/cache@v2
94-
with:
95-
path: |
96-
./node_modules
97-
key: ${{ hashFiles('yarn.lock') }}
98-
- name: Install dependencies
99-
run: yarn install
100-
- name: Tests style
101-
run: yarn lint
102-
- name: Yaml Style
103-
uses: ibiqlik/action-yamllint@v3
104-
with:
105-
config_file: .yamllint.yml
106-
types_test:
107-
runs-on: ubuntu-latest
108-
name: types-check
109-
steps:
110-
- uses: actions/checkout@v2
111-
- name: Cache dependencies
112-
uses: actions/cache@v2
113-
with:
114-
path: |
115-
./node_modules
116-
key: ${{ hashFiles('yarn.lock') }}
117-
- name: Setup node
118-
uses: actions/setup-node@v2
119-
- name: Install dependencies
120-
run: yarn --dev
121-
- name: Build project
122-
run: yarn build
123-
- name: Run types check
124-
run: yarn types

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ jobs:
77
publish-npm:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v2
11-
- uses: actions/setup-node@v2
10+
- uses: actions/checkout@v3
11+
- uses: actions/setup-node@v3
1212
with:
1313
node-version: 12
1414
registry-url: https://registry.npmjs.org/

.github/workflows/tests.yml

Lines changed: 41 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,43 @@ on:
1111

1212
jobs:
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

bors.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
status = [
22
'style-check',
33
'types-check',
4-
'integration-tests (Node.js 12)',
54
'integration-tests (Node.js 14)',
5+
'integration-tests (Node.js 16)',
6+
'integration-tests (Node.js 18)',
67
'cypress-run'
78
]
89
# 1 hour timeout

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
"rollup-plugin-babel": "^4.4.0",
101101
"rollup-plugin-node-polyfills": "^0.2.1",
102102
"rollup-plugin-terser": "^7.0.0",
103-
"rollup-plugin-typescript2": "^0.30.0",
103+
"rollup-plugin-typescript2": "^0.32.1",
104104
"shx": "^0.3.3",
105105
"ts-jest": "^27.0.7",
106106
"tslib": "^2.4.0",

0 commit comments

Comments
 (0)