Skip to content

Update README.md

Update README.md #235

# Testing the code base against the Meilisearch pre-releases
name: Pre-Release Tests
# Will only run for PRs and pushes to bump-meilisearch-v*
on:
pull_request:
branches:
- 'bump-meilisearch-v**'
- 'pre-release-beta/**'
push:
branches:
- 'bump-meilisearch-v**'
- 'pre-release-beta/**'
jobs:
meilisearch-version:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') || startsWith(github.base_ref, 'pre-release-beta')
outputs:
version: ${{ steps.grep-step.outputs.meilisearch_version }}
steps:
- uses: actions/checkout@v4
- 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=$MEILISEARCH_VERSION" >> $GITHUB_OUTPUT
cypress-autocomplete-client-run:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') || startsWith(github.base_ref, 'pre-release-beta')
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: autocomplete-client end-to-end-tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn
- name: Run local browser tests
uses: cypress-io/github-action@v6
with:
project: ./playgrounds/autocomplete
wait-on: 'http://localhost:7700'
# Tests are only done on one playground to avoid long testing time
start: yarn playground:autocomplete
env: playground=local
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
cypress-instant-meilisearch-run:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') || startsWith(github.base_ref, 'pre-release-beta')
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: instant-meilisearch end-to-end-tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 18
cache: yarn
- name: Install dependencies
run: yarn
- name: Run local browser tests
uses: cypress-io/github-action@v6
with:
project: ./playgrounds/local-react
wait-on: 'http://localhost:7700'
# Tests are only done on one playground to avoid long testing time
start: yarn playground:local-react
env: playground=local
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-videos
path: cypress/videos
integration_tests:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' || startsWith(github.base_ref, 'bump-meilisearch-v') || startsWith(github.base_ref, 'pre-release-beta')
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:
node: ['18', '20']
name: integration-tests (Node.js ${{ matrix.node }})
steps:
- uses: actions/checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
cache: yarn
node-version: ${{ matrix.node }}
- name: Install dependencies
run: yarn install
- name: Run tests
run: yarn test
- name: Build project
run: yarn build