Skip to content

Commit a0fe3c1

Browse files
committed
Update pre-release and beta ci
1 parent 05cfa2f commit a0fe3c1

File tree

3 files changed

+33
-77
lines changed

3 files changed

+33
-77
lines changed

.github/workflows/beta-tests.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ 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
3138
uses: actions/checkout@v3
@@ -34,24 +41,23 @@ jobs:
3441
with:
3542
node-version: 16
3643
cache: yarn
37-
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
38-
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }} meilisearch --master-key=masterKey --no-analytics
3944
- name: Install dependencies
4045
run: yarn --dev && yarn --cwd ./tests/env/react
4146
- name: Setup Meilisearch Index
4247
run: yarn local:env:setup
4348
- name: Run local browser tests
4449
uses: cypress-io/github-action@v3
4550
with:
51+
wait-on: 'http://localhost:7700'
4652
# Tests are only done on one playground to avoid long testing time
4753
start: yarn local:env:react
4854
env: playground=local
49-
- uses: actions/upload-artifact@v2
55+
- uses: actions/upload-artifact@v3
5056
if: failure()
5157
with:
5258
name: cypress-screenshots
5359
path: cypress/screenshots
54-
- uses: actions/upload-artifact@v2
60+
- uses: actions/upload-artifact@v3
5561
if: failure()
5662
with:
5763
name: cypress-videos
@@ -60,6 +66,14 @@ jobs:
6066
tests:
6167
runs-on: ubuntu-latest
6268
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'
6377
strategy:
6478
fail-fast: false
6579
matrix:

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

Lines changed: 10 additions & 57 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
1816
uses: actions/checkout@v3
19-
- name: Cache dependencies
20-
uses: actions/cache@v2
21-
with:
22-
path: |
23-
./node_modules
24-
key: ${{ hashFiles('yarn.lock') }}
2517
- name: Setup node
2618
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
@@ -41,17 +34,18 @@ jobs:
4134
- name: Setup Meilisearch Index
4235
run: yarn local:env:setup
4336
- name: Run local browser tests
44-
uses: cypress-io/github-action@v3
37+
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
@@ -66,12 +60,11 @@ jobs:
6660
name: integration-tests (Node.js ${{ matrix.node }})
6761
steps:
6862
- uses: actions/checkout@v3
69-
- name: Cache dependencies
70-
uses: actions/cache@v2
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@v3
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@v3
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@v3
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/tests.yml

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,14 @@ on:
1010
- main
1111

1212
jobs:
13-
grep-docker-version:
14-
runs-on: ubuntu-latest
15-
outputs:
16-
docker-version: ${{ steps.grep-step.outputs.version }}
17-
steps:
18-
- uses: actions/checkout@v3
19-
- name: Grep docker beta version of Meilisearch
20-
id: grep-step
21-
run: |
22-
echo ::set-output name=version::latest
2313
cypress-run:
24-
needs: ['grep-docker-version']
14+
runs-on: ubuntu-latest
2515
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
2616
# Will still run for each push to bump-meilisearch-v*
2717
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
28-
runs-on: ubuntu-latest
2918
services:
3019
meilisearch:
31-
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
20+
image: getmeili/meilisearch:latest
3221
env:
3322
MEILI_MASTER_KEY: 'masterKey'
3423
MEILI_NO_ANALYTICS: 'true'
@@ -53,12 +42,12 @@ jobs:
5342
# Tests are only done on one playground to avoid long testing time
5443
start: yarn local:env:react
5544
env: playground=local
56-
- uses: actions/upload-artifact@v2
45+
- uses: actions/upload-artifact@v3
5746
if: failure()
5847
with:
5948
name: cypress-screenshots
6049
path: cypress/screenshots
61-
- uses: actions/upload-artifact@v2
50+
- uses: actions/upload-artifact@v3
6251
if: failure()
6352
with:
6453
name: cypress-videos

0 commit comments

Comments
 (0)