2023-04-28 17:59:04 +02:00
|
|
|
# If any test fails, the engine team should ensure the "breaking" changes are expected and contact the integration team
|
|
|
|
name: SDKs tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
2023-05-25 12:16:38 +02:00
|
|
|
inputs:
|
|
|
|
docker_image:
|
|
|
|
description: 'The Meilisearch Docker image used'
|
|
|
|
required: false
|
|
|
|
default: nightly
|
2023-04-28 17:59:04 +02:00
|
|
|
schedule:
|
|
|
|
- cron: "0 6 * * MON" # Every Monday at 6:00AM
|
|
|
|
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: 'masterKey'
|
|
|
|
MEILI_NO_ANALYTICS: 'true'
|
2023-09-07 18:12:17 +02:00
|
|
|
DISABLE_COVERAGE: 'true'
|
2023-04-28 17:59:04 +02:00
|
|
|
|
|
|
|
jobs:
|
2023-06-06 10:38:05 +02:00
|
|
|
define-docker-image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
docker-image: ${{ steps.define-image.outputs.docker-image }}
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-06-06 10:38:05 +02:00
|
|
|
- name: Define the Docker image we need to use
|
|
|
|
id: define-image
|
|
|
|
run: |
|
2023-06-19 18:49:15 +02:00
|
|
|
event=${{ github.event_name }}
|
2023-06-06 10:38:05 +02:00
|
|
|
echo "docker-image=nightly" >> $GITHUB_OUTPUT
|
|
|
|
if [[ $event == 'workflow_dispatch' ]]; then
|
|
|
|
echo "docker-image=${{ github.event.inputs.docker_image }}" >> $GITHUB_OUTPUT
|
|
|
|
fi
|
2023-09-07 18:12:17 +02:00
|
|
|
- name: Docker image is ${{ steps.define-image.outputs.docker-image }}
|
|
|
|
run: echo "Docker image is ${{ steps.define-image.outputs.docker-image }}"
|
2023-04-28 17:59:04 +02:00
|
|
|
|
2023-09-07 18:12:17 +02:00
|
|
|
##########
|
|
|
|
## SDKs ##
|
|
|
|
##########
|
|
|
|
|
|
|
|
meilisearch-dotnet-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-09-07 18:12:17 +02:00
|
|
|
name: .NET SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
MEILISEARCH_VERSION: ${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-dotnet
|
|
|
|
- name: Setup .NET Core
|
2024-01-02 09:59:46 +01:00
|
|
|
uses: actions/setup-dotnet@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
dotnet-version: "6.0.x"
|
|
|
|
- name: Install dependencies
|
|
|
|
run: dotnet restore
|
|
|
|
- name: Build
|
|
|
|
run: dotnet build --configuration Release --no-restore
|
|
|
|
- name: Meilisearch (latest version) setup with Docker
|
|
|
|
run: docker compose up -d
|
|
|
|
- name: Run tests
|
|
|
|
run: dotnet test --no-restore --verbosity normal
|
|
|
|
|
|
|
|
meilisearch-dart-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: Dart SDK tests
|
2023-04-28 17:59:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-dart
|
|
|
|
- uses: dart-lang/setup-dart@v1
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2024-01-02 09:59:46 +01:00
|
|
|
sdk: 'latest'
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Install dependencies
|
2023-09-07 18:12:17 +02:00
|
|
|
run: dart pub get
|
|
|
|
- name: Run integration tests
|
|
|
|
run: dart test --concurrency=4
|
|
|
|
|
|
|
|
meilisearch-go-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: Go SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
|
|
|
- name: Set up Go
|
2024-01-02 09:59:46 +01:00
|
|
|
uses: actions/setup-go@v5
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
go-version: stable
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-go
|
|
|
|
- name: Get dependencies
|
|
|
|
run: |
|
|
|
|
go get -v -t -d ./...
|
|
|
|
if [ -f Gopkg.toml ]; then
|
|
|
|
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
|
|
|
dep ensure
|
|
|
|
fi
|
|
|
|
- name: Run integration tests
|
|
|
|
run: go test -v ./...
|
2023-04-28 17:59:04 +02:00
|
|
|
|
2023-09-07 18:12:17 +02:00
|
|
|
meilisearch-java-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-09-07 18:12:17 +02:00
|
|
|
name: Java SDK tests
|
2023-04-28 17:59:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-java
|
|
|
|
- name: Set up Java
|
2024-01-02 09:59:46 +01:00
|
|
|
uses: actions/setup-java@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
java-version: 8
|
|
|
|
distribution: 'zulu'
|
|
|
|
cache: gradle
|
|
|
|
- name: Grant execute permission for gradlew
|
|
|
|
run: chmod +x gradlew
|
|
|
|
- name: Build and run unit and integration tests
|
|
|
|
run: ./gradlew build integrationTest
|
|
|
|
|
|
|
|
meilisearch-js-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: JS SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-js
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Setup node
|
2023-11-01 17:57:38 +00:00
|
|
|
uses: actions/setup-node@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
cache: 'yarn'
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Install dependencies
|
2023-09-07 18:12:17 +02:00
|
|
|
run: yarn --dev
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Run tests
|
|
|
|
run: yarn test
|
2023-09-07 18:12:17 +02:00
|
|
|
- name: Build project
|
2023-04-28 17:59:04 +02:00
|
|
|
run: yarn build
|
2023-09-07 18:12:17 +02:00
|
|
|
- name: Run ESM env
|
|
|
|
run: yarn test:env:esm
|
|
|
|
- name: Run Node.js env
|
|
|
|
run: yarn test:env:nodejs
|
|
|
|
- name: Run node typescript env
|
|
|
|
run: yarn test:env:node-ts
|
|
|
|
- name: Run Browser env
|
|
|
|
run: yarn test:env:browser
|
2023-04-28 17:59:04 +02:00
|
|
|
|
|
|
|
meilisearch-php-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-04-28 17:59:04 +02:00
|
|
|
name: PHP SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-php
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
|
|
run: composer validate
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
composer remove --dev friendsofphp/php-cs-fixer --no-update --no-interaction
|
|
|
|
composer update --prefer-dist --no-progress
|
|
|
|
- name: Run test suite - default HTTP client (Guzzle 7)
|
|
|
|
run: |
|
|
|
|
sh scripts/tests.sh
|
|
|
|
composer remove --dev guzzlehttp/guzzle http-interop/http-factory-guzzle
|
|
|
|
|
|
|
|
meilisearch-python-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-04-28 17:59:04 +02:00
|
|
|
name: Python SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-python
|
|
|
|
- name: Set up Python
|
2024-01-02 09:59:46 +01:00
|
|
|
uses: actions/setup-python@v5
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Install pipenv
|
|
|
|
uses: dschep/install-pipenv-action@v1
|
|
|
|
- name: Install dependencies
|
|
|
|
run: pipenv install --dev --python=${{ matrix.python-version }}
|
|
|
|
- name: Test with pytest
|
|
|
|
run: pipenv run pytest
|
|
|
|
|
2023-09-07 18:12:17 +02:00
|
|
|
meilisearch-ruby-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-09-07 18:12:17 +02:00
|
|
|
name: Ruby SDK tests
|
2023-04-28 17:59:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-ruby
|
|
|
|
- name: Set up Ruby 3
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 3
|
|
|
|
- name: Install ruby dependencies
|
|
|
|
run: bundle install --with test
|
|
|
|
- name: Run test suite
|
|
|
|
run: bundle exec rspec
|
|
|
|
|
|
|
|
meilisearch-rust-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: Rust SDK tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-rust
|
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|
2023-04-28 17:59:04 +02:00
|
|
|
|
2023-09-07 18:12:17 +02:00
|
|
|
meilisearch-swift-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-09-07 18:12:17 +02:00
|
|
|
name: Swift SDK tests
|
2023-04-28 17:59:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-swift
|
|
|
|
- name: Run tests
|
|
|
|
run: swift test
|
|
|
|
|
|
|
|
########################
|
|
|
|
## FRONT-END PLUGINS ##
|
|
|
|
########################
|
|
|
|
|
|
|
|
meilisearch-js-plugins-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: meilisearch-js-plugins tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-js-plugins
|
|
|
|
- name: Setup node
|
2023-11-01 17:57:38 +00:00
|
|
|
uses: actions/setup-node@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
cache: yarn
|
|
|
|
- name: Install dependencies
|
|
|
|
run: yarn install
|
|
|
|
- name: Run tests
|
|
|
|
run: yarn test
|
|
|
|
- name: Build all the playgrounds and the packages
|
|
|
|
run: yarn build
|
|
|
|
|
|
|
|
########################
|
|
|
|
## BACK-END PLUGINS ###
|
|
|
|
########################
|
|
|
|
|
|
|
|
meilisearch-rails-tests:
|
|
|
|
needs: define-docker-image
|
|
|
|
name: meilisearch-rails tests
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-09-07 18:12:17 +02:00
|
|
|
with:
|
|
|
|
repository: meilisearch/meilisearch-rails
|
2023-04-28 17:59:04 +02:00
|
|
|
- name: Set up Ruby 3
|
|
|
|
uses: ruby/setup-ruby@v1
|
|
|
|
with:
|
|
|
|
ruby-version: 3
|
2023-09-07 18:12:17 +02:00
|
|
|
bundler-cache: true
|
|
|
|
- name: Run tests
|
2023-04-28 17:59:04 +02:00
|
|
|
run: bundle exec rspec
|
|
|
|
|
2023-09-07 18:12:17 +02:00
|
|
|
meilisearch-symfony-tests:
|
2023-06-06 10:38:05 +02:00
|
|
|
needs: define-docker-image
|
2023-09-07 18:12:17 +02:00
|
|
|
name: meilisearch-symfony tests
|
2023-04-28 17:59:04 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
services:
|
|
|
|
meilisearch:
|
2023-06-19 18:49:15 +02:00
|
|
|
image: getmeili/meilisearch:${{ needs.define-docker-image.outputs.docker-image }}
|
2023-04-28 17:59:04 +02:00
|
|
|
env:
|
|
|
|
MEILI_MASTER_KEY: ${{ env.MEILI_MASTER_KEY }}
|
|
|
|
MEILI_NO_ANALYTICS: ${{ env.MEILI_NO_ANALYTICS }}
|
|
|
|
ports:
|
|
|
|
- '7700:7700'
|
|
|
|
steps:
|
2024-01-02 09:59:46 +01:00
|
|
|
- uses: actions/checkout@v4
|
2023-04-28 17:59:04 +02:00
|
|
|
with:
|
2023-09-07 18:12:17 +02:00
|
|
|
repository: meilisearch/meilisearch-symfony
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
tools: composer:v2, flex
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
|
|
run: composer validate
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --quiet
|
|
|
|
- name: Remove doctrine/annotations
|
|
|
|
run: composer remove --dev doctrine/annotations
|
|
|
|
- name: Run test suite
|
|
|
|
run: composer test:unit
|