Skip to content

Commit 3f9ccc6

Browse files
Merge #813
813: Fix naming and beta CI r=bidoubiwa a=bidoubiwa - Adds consistency in tests naming accross repo's - Adds context / needs and services to access Meilisearch instance Co-authored-by: Charlotte Vermandel <[email protected]>
2 parents 03086c1 + 965a7c9 commit 3f9ccc6

File tree

4 files changed

+50
-40
lines changed

4 files changed

+50
-40
lines changed

.github/workflows/beta-tests.yml

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,30 @@ on:
99
branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']
1010

1111
jobs:
12-
grep-docker-version:
12+
meilisearch-version:
1313
runs-on: ubuntu-latest
1414
outputs:
15-
docker-version: ${{ steps.grep-step.outputs.version }}
15+
version: ${{ steps.grep-step.outputs.version }}
1616
steps:
1717
- uses: actions/checkout@v3
1818
- name: Grep docker beta version of Meilisearch
1919
id: grep-step
2020
run: |
21-
MEILISEARCH_IMAGE=$(sh .github/scripts/beta-docker-version.sh)
22-
echo $MEILISEARCH_IMAGE
23-
echo ::set-output name=version::$MEILISEARCH_IMAGE
21+
MEILISEARCH_VERSION=$(sh .github/scripts/beta-docker-version.sh)
22+
echo $MEILISEARCH_VERSION
23+
echo ::set-output name=version::$MEILISEARCH_VERSION
2424
cypress-run:
2525
runs-on: ubuntu-latest
26-
needs: ['grep-docker-version']
27-
# Only test on Google Chrome
26+
needs: ['meilisearch-version']
2827
services:
2928
meilisearch:
30-
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
29+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
3130
env:
3231
MEILI_MASTER_KEY: 'masterKey'
3332
MEILI_NO_ANALYTICS: 'true'
3433
ports:
3534
- '7700:7700'
35+
name: end-to-end-tests
3636
steps:
3737
- name: Checkout
3838
uses: actions/checkout@v3
@@ -63,12 +63,12 @@ jobs:
6363
name: cypress-videos
6464
path: cypress/videos
6565

66-
tests:
66+
integration_tests:
6767
runs-on: ubuntu-latest
68-
needs: ['grep-docker-version']
68+
needs: ['meilisearch-version']
6969
services:
7070
meilisearch:
71-
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
71+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
7272
env:
7373
MEILI_MASTER_KEY: 'masterKey'
7474
MEILI_NO_ANALYTICS: 'true'
@@ -81,18 +81,11 @@ jobs:
8181
name: integration-tests (Node.js ${{ matrix.node }})
8282
steps:
8383
- uses: actions/checkout@v3
84-
- name: Cache dependencies
85-
uses: actions/cache@v2
86-
with:
87-
path: |
88-
./node_modules
89-
key: ${{ hashFiles('yarn.lock') }}
9084
- name: Setup node
9185
uses: actions/setup-node@v3
9286
with:
93-
node-version: '14.x'
94-
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
95-
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }} meilisearch --master-key=masterKey --no-analytics
87+
cache: yarn
88+
node-version: ${{ matrix.node }}
9689
- name: Install dependencies
9790
run: yarn install
9891
- name: Run tests

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

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,30 @@ on:
99
branches: [bump-meilisearch-v*]
1010

1111
jobs:
12+
meilisearch-version:
13+
runs-on: ubuntu-latest
14+
outputs:
15+
version: ${{ steps.grep-step.outputs.version }}
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Grep docker beta version of Meilisearch
19+
id: grep-step
20+
run: |
21+
MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh)
22+
echo $MEILISEARCH_VERSION
23+
echo ::set-output name=version::$MEILISEARCH_VERSION
1224
cypress-run:
1325
runs-on: ubuntu-latest
26+
needs: ['meilisearch-version']
27+
services:
28+
meilisearch:
29+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
30+
env:
31+
MEILI_MASTER_KEY: 'masterKey'
32+
MEILI_NO_ANALYTICS: 'true'
33+
ports:
34+
- '7700:7700'
35+
name: end-to-end-tests
1436
steps:
1537
- name: Checkout
1638
uses: actions/checkout@v3
@@ -21,16 +43,6 @@ jobs:
2143
cache: yarn
2244
- name: Install dependencies
2345
run: yarn --dev && yarn --cwd ./tests/env/react
24-
- name: Grep latest version of Meilisearch
25-
run: |
26-
echo "MEILISEARCH_LATEST=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh)" >> $GITHUB_ENV
27-
- name: Download Meilisearch
28-
run: |
29-
curl https://github.com/meilisearch/meilisearch/releases/download/${{ env.MEILISEARCH_LATEST }}/meilisearch-linux-amd64 --output meilisearch --location
30-
chmod +x meilisearch
31-
- name: Run Meilisearch
32-
run: |
33-
./meilisearch --master-key=masterKey --no-analytics &
3446
- name: Setup Meilisearch Index
3547
run: yarn local:env:setup
3648
- name: Run local browser tests
@@ -51,8 +63,17 @@ jobs:
5163
name: cypress-videos
5264
path: cypress/videos
5365

54-
tests:
66+
integration_tests:
5567
runs-on: ubuntu-latest
68+
needs: ['meilisearch-version']
69+
services:
70+
meilisearch:
71+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
72+
env:
73+
MEILI_MASTER_KEY: 'masterKey'
74+
MEILI_NO_ANALYTICS: 'true'
75+
ports:
76+
- '7700:7700'
5677
strategy:
5778
fail-fast: false
5879
matrix:
@@ -65,10 +86,6 @@ jobs:
6586
with:
6687
cache: yarn
6788
node-version: ${{ matrix.node }}
68-
- name: Get the latest Meilisearch RC
69-
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
70-
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
71-
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} meilisearch --master-key=masterKey --no-analytics
7289
- name: Install dependencies
7390
run: yarn install
7491
- name: Run tests

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
MEILI_NO_ANALYTICS: 'true'
2424
ports:
2525
- '7700:7700'
26+
name: end-to-end-tests
2627
steps:
2728
- name: Checkout
2829
uses: actions/checkout@v3
@@ -52,7 +53,7 @@ jobs:
5253
with:
5354
name: cypress-videos
5455
path: cypress/videos
55-
tests:
56+
integration_tests:
5657
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
5758
# Will still run for each push to bump-meilisearch-v*
5859
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
@@ -83,13 +84,12 @@ jobs:
8384
run: yarn test
8485
- name: Build project
8586
run: yarn build
86-
style:
87+
style_tests:
8788
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
8889
# Will still run for each push to bump-meilisearch-v*
8990
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
9091
name: style-check
9192
runs-on: ubuntu-latest
92-
9393
steps:
9494
- uses: actions/checkout@v3
9595
- name: Setup node
@@ -105,7 +105,7 @@ jobs:
105105
uses: ibiqlik/action-yamllint@v3
106106
with:
107107
config_file: .yamllint.yml
108-
types_test:
108+
types_tests:
109109
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
110110
# Will still run for each push to bump-meilisearch-v*
111111
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')

bors.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ status = [
44
'integration-tests (Node.js 14)',
55
'integration-tests (Node.js 16)',
66
'integration-tests (Node.js 18)',
7-
'cypress-run'
7+
'end-to-end-tests'
88
]
99
# 1 hour timeout
1010
timeout-sec = 3600

0 commit comments

Comments
 (0)