Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 13 additions & 20 deletions .github/workflows/beta-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ on:
branches: ['!bump-meilisearch-v*.*.*-beta', '**-beta']

jobs:
grep-docker-version:
meilisearch-version:
runs-on: ubuntu-latest
outputs:
docker-version: ${{ steps.grep-step.outputs.version }}
version: ${{ steps.grep-step.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Grep docker beta version of Meilisearch
id: grep-step
run: |
MEILISEARCH_IMAGE=$(sh .github/scripts/beta-docker-version.sh)
echo $MEILISEARCH_IMAGE
echo ::set-output name=version::$MEILISEARCH_IMAGE
MEILISEARCH_VERSION=$(sh .github/scripts/beta-docker-version.sh)
echo $MEILISEARCH_VERSION
echo ::set-output name=version::$MEILISEARCH_VERSION
cypress-run:
runs-on: ubuntu-latest
needs: ['grep-docker-version']
# Only test on Google Chrome
needs: ['meilisearch-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
name: end-to-end-tests
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -63,12 +63,12 @@ jobs:
name: cypress-videos
path: cypress/videos

tests:
integration_tests:
runs-on: ubuntu-latest
needs: ['grep-docker-version']
needs: ['meilisearch-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }}
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
Expand All @@ -81,18 +81,11 @@ jobs:
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v2
with:
path: |
./node_modules
key: ${{ hashFiles('yarn.lock') }}
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: '14.x'
- name: Meilisearch (${{ needs.grep-docker-version.outputs.docker-version }}) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ needs.grep-docker-version.outputs.docker-version }} meilisearch --master-key=masterKey --no-analytics
cache: yarn
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install
- name: Run tests
Expand Down
47 changes: 32 additions & 15 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,30 @@ on:
branches: [bump-meilisearch-v*]

jobs:
meilisearch-version:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.grep-step.outputs.version }}
steps:
- uses: actions/checkout@v3
- name: Grep docker beta version of Meilisearch
id: grep-step
run: |
MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh)
echo $MEILISEARCH_VERSION
echo ::set-output name=version::$MEILISEARCH_VERSION
cypress-run:
runs-on: ubuntu-latest
needs: ['meilisearch-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
name: end-to-end-tests
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -21,16 +43,6 @@ jobs:
cache: yarn
- name: Install dependencies
run: yarn --dev && yarn --cwd ./tests/env/react
- name: Grep latest version of Meilisearch
run: |
echo "MEILISEARCH_LATEST=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | sh)" >> $GITHUB_ENV
- name: Download Meilisearch
run: |
curl https://github.com/meilisearch/meilisearch/releases/download/${{ env.MEILISEARCH_LATEST }}/meilisearch-linux-amd64 --output meilisearch --location
chmod +x meilisearch
- name: Run Meilisearch
run: |
./meilisearch --master-key=masterKey --no-analytics &
- name: Setup Meilisearch Index
run: yarn local:env:setup
- name: Run local browser tests
Expand All @@ -51,8 +63,17 @@ jobs:
name: cypress-videos
path: cypress/videos

tests:
integration_tests:
runs-on: ubuntu-latest
needs: ['meilisearch-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
env:
MEILI_MASTER_KEY: 'masterKey'
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
strategy:
fail-fast: false
matrix:
Expand All @@ -65,10 +86,6 @@ jobs:
with:
cache: yarn
node-version: ${{ matrix.node }}
- name: Get the latest Meilisearch RC
run: echo "MEILISEARCH_VERSION=$(curl https://raw.githubusercontent.com/meilisearch/integration-guides/main/scripts/get-latest-meilisearch-rc.sh | bash)" >> $GITHUB_ENV
- name: Meilisearch (${{ env.MEILISEARCH_VERSION }}) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:${{ env.MEILISEARCH_VERSION }} meilisearch --master-key=masterKey --no-analytics
- name: Install dependencies
run: yarn install
- name: Run tests
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
MEILI_NO_ANALYTICS: 'true'
ports:
- '7700:7700'
name: end-to-end-tests
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:
with:
name: cypress-videos
path: cypress/videos
tests:
integration_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
Expand Down Expand Up @@ -83,13 +84,12 @@ jobs:
run: yarn test
- name: Build project
run: yarn build
style:
style_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
name: style-check
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Setup node
Expand All @@ -105,7 +105,7 @@ jobs:
uses: ibiqlik/action-yamllint@v3
with:
config_file: .yamllint.yml
types_test:
types_tests:
# Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
# Will still run for each push to bump-meilisearch-v*
if: github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
Expand Down
2 changes: 1 addition & 1 deletion bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ status = [
'integration-tests (Node.js 14)',
'integration-tests (Node.js 16)',
'integration-tests (Node.js 18)',
'cypress-run'
'end-to-end-tests'
]
# 1 hour timeout
timeout-sec = 3600