Skip to content

Commit a3225d5

Browse files
committed
Fix naming and beta CI
1 parent 03086c1 commit a3225d5

File tree

3 files changed

+78
-46
lines changed

3 files changed

+78
-46
lines changed

.github/workflows/beta-tests.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,49 @@
11
# Testing the code base against a specific Meilisearch feature
22
name: Beta tests
33

4-
# Will only run for PRs and pushes to *-beta
54
on:
6-
push:
7-
branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']
85
pull_request:
9-
branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']
6+
push:
7+
# trying and staging branches are for BORS config
8+
branches:
9+
- trying
10+
- staging
11+
- main
12+
13+
# TODO: CHANGE
14+
# Will only run for PRs and pushes to *-beta
15+
# on:
16+
# push:
17+
# branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']
18+
# pull_request:
19+
# branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']
1020

1121
jobs:
12-
grep-docker-version:
22+
meilisearch-version:
1323
runs-on: ubuntu-latest
1424
outputs:
15-
docker-version: ${{ steps.grep-step.outputs.version }}
25+
version: ${{ steps.grep-step.outputs.version }}
1626
steps:
1727
- uses: actions/checkout@v3
1828
- name: Grep docker beta version of Meilisearch
1929
id: grep-step
2030
run: |
21-
MEILISEARCH_IMAGE=$(sh .github/scripts/beta-docker-version.sh)
22-
echo $MEILISEARCH_IMAGE
23-
echo ::set-output name=version::$MEILISEARCH_IMAGE
31+
MEILISEARCH_VERSION=$(sh .github/scripts/beta-docker-version.sh)
32+
echo $MEILISEARCH_VERSION
33+
# TODO: CHANGE
34+
echo ::set-output name=version::latest
2435
cypress-run:
2536
runs-on: ubuntu-latest
26-
needs: ['grep-docker-version']
27-
# Only test on Google Chrome
37+
needs: ['meilisearch-version']
2838
services:
2939
meilisearch:
30-
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
40+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
3141
env:
3242
MEILI_MASTER_KEY: 'masterKey'
3343
MEILI_NO_ANALYTICS: 'true'
3444
ports:
3545
- '7700:7700'
46+
name: end-to-end-tests
3647
steps:
3748
- name: Checkout
3849
uses: actions/checkout@v3
@@ -63,12 +74,12 @@ jobs:
6374
name: cypress-videos
6475
path: cypress/videos
6576

66-
tests:
77+
integration_tests:
6778
runs-on: ubuntu-latest
68-
needs: ['grep-docker-version']
79+
needs: ['meilisearch-version']
6980
services:
7081
meilisearch:
71-
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
82+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
7283
env:
7384
MEILI_MASTER_KEY: 'masterKey'
7485
MEILI_NO_ANALYTICS: 'true'
@@ -81,18 +92,11 @@ jobs:
8192
name: integration-tests (Node.js ${{ matrix.node }})
8293
steps:
8394
- 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') }}
9095
- name: Setup node
9196
uses: actions/setup-node@v3
9297
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
98+
cache: yarn
99+
node-version: ${{ matrix.node }}
96100
- name: Install dependencies
97101
run: yarn install
98102
- name: Run tests

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

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,49 @@
11
# Testing the code base against the Meilisearch pre-releases
22
name: Pre-Release Tests
33

4+
# TODO: CHANGE
45
# Will only run for PRs and pushes to bump-meilisearch-v*
6+
# on:
7+
# push:
8+
# branches: [bump-meilisearch-v*]
9+
# pull_request:
10+
# branches: [bump-meilisearch-v*]
11+
512
on:
6-
push:
7-
branches: [bump-meilisearch-v*]
813
pull_request:
9-
branches: [bump-meilisearch-v*]
14+
push:
15+
# trying and staging branches are for BORS config
16+
branches:
17+
- trying
18+
- staging
19+
- main
1020

1121
jobs:
22+
meilisearch-version:
23+
runs-on: ubuntu-latest
24+
outputs:
25+
version: ${{ steps.grep-step.outputs.version }}
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Grep docker beta version of Meilisearch
29+
id: grep-step
30+
run: |
31+
MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh)
32+
echo $MEILISEARCH_VERSION
33+
# TODO: CHANGE
34+
echo ::set-output name=version::latest
1235
cypress-run:
1336
runs-on: ubuntu-latest
37+
needs: ['meilisearch-version']
38+
services:
39+
meilisearch:
40+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
41+
env:
42+
MEILI_MASTER_KEY: 'masterKey'
43+
MEILI_NO_ANALYTICS: 'true'
44+
ports:
45+
- '7700:7700'
46+
name: end-to-end-tests
1447
steps:
1548
- name: Checkout
1649
uses: actions/checkout@v3
@@ -21,16 +54,6 @@ jobs:
2154
cache: yarn
2255
- name: Install dependencies
2356
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 &
3457
- name: Setup Meilisearch Index
3558
run: yarn local:env:setup
3659
- name: Run local browser tests
@@ -51,8 +74,17 @@ jobs:
5174
name: cypress-videos
5275
path: cypress/videos
5376

54-
tests:
77+
integration_tests:
5578
runs-on: ubuntu-latest
79+
needs: ['meilisearch-version']
80+
services:
81+
meilisearch:
82+
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
83+
env:
84+
MEILI_MASTER_KEY: 'masterKey'
85+
MEILI_NO_ANALYTICS: 'true'
86+
ports:
87+
- '7700:7700'
5688
strategy:
5789
fail-fast: false
5890
matrix:
@@ -65,10 +97,6 @@ jobs:
6597
with:
6698
cache: yarn
6799
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
72100
- name: Install dependencies
73101
run: yarn install
74102
- 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')

0 commit comments

Comments
 (0)