Skip to content

Commit

Permalink
Merge pull request #343 from norkunas/prepare-release
Browse files Browse the repository at this point in the history
Prepare release
  • Loading branch information
norkunas authored Aug 2, 2024
2 parents ecac616 + e110588 commit 4bd0b39
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ indent_size = 4
max_line_length = 120

[*.{yml,yaml}]
indent_size = 4
indent_size = 2

[*.json]
indent_size = 2
Expand Down
12 changes: 12 additions & 0 deletions .github/scripts/get-latest-meilisearch-rc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

# This script is used in the SDK CIs to fetch the latest Meilisearch RC name (ex: v0.16.0rc2).
# The Meilisearch RC is needed when maintainers are developing features during the pre-release week because the final Meilisearch release is not out yet.

temp_file='temp_file' # temp_file needed because `grep` would start before the download is over
curl -s 'https://api.github.com/repos/meilisearch/meilisearch/releases' > "$temp_file"
latest_rc_release=$(cat "$temp_file" \
| grep -E 'tag_name' | grep 'rc' | head -1 \
| tr -d ',"' | cut -d ':' -f2 | tr -d ' ')
rm -rf "$temp_file"
echo "$latest_rc_release"
75 changes: 65 additions & 10 deletions .github/workflows/pre-release-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,80 @@ on:
- bump-meilisearch-v*

jobs:
meilisearch-version:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Grep docker latest rc version of Meilisearch
id: grep-step
run: |
MEILISEARCH_VERSION=$(sh .github/scripts/get-latest-meilisearch-rc.sh)
echo $MEILISEARCH_VERSION
echo "version=$MEILISEARCH_VERSION" >> $GITHUB_OUTPUT
outputs:
version: ${{ steps.grep-step.outputs.version }}

integration-tests:
runs-on: ubuntu-latest
needs: ['meilisearch-version']
services:
meilisearch:
image: getmeili/meilisearch:${{ needs.meilisearch-version.outputs.version }}
ports:
- '7700:7700'
env:
MEILI_MASTER_KEY: masterKey
MEILI_NO_ANALYTICS: true
strategy:
matrix:
php-versions: ['7.4', '8.0']
name: integration-tests-against-rc (PHP ${{ matrix.php-versions }})
php-version: ['7.4', '8.1', '8.2', '8.3']
sf-version: ['5.4', '6.4', '7.0', '7.1']
exclude:
- php-version: '7.4'
sf-version: '6.4'
- php-version: '7.4'
sf-version: '7.0'
- php-version: '7.4'
sf-version: '7.1'
- php-version: '8.1'
sf-version: '5.4'
- php-version: '8.1'
sf-version: '7.0'
- php-version: '8.1'
sf-version: '7.1'
- php-version: '8.2'
sf-version: '5.4'
- php-version: '8.3'
sf-version: '5.4'
- php-version: '8.3'
sf-version: '5.4'

name: integration-tests-against-rc (PHP ${{ matrix.php-version }}) (Symfony ${{ matrix.sf-version }}.*)
steps:
- uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ matrix.php-version }}
tools: composer, flex

- name: Validate composer.json and composer.lock
run: composer validate

- name: Remove doctrine/annotations
if: matrix.php-version != '7.4'
run: sed -i '/doctrine\/annotations/d' composer.json

- name: Install dependencies
run: composer install --prefer-dist --no-progress --quiet
- 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
uses: ramsey/composer-install@v3
env:
SYMFONY_REQUIRE: ${{ matrix.sf-version }}.*
with:
dependency-versions: 'highest'

- name: Run test suite
run: composer test:unit
run: composer test:unit -- --coverage-clover coverage.xml
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
meilisearch:
image: getmeili/meilisearch:latest
ports:
- 7700:7700
- '7700:7700'
env:
MEILI_MASTER_KEY: masterKey
MEILI_NO_ANALYTICS: true
Expand Down
2 changes: 1 addition & 1 deletion src/MeilisearchBundle.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

final class MeilisearchBundle extends Bundle
{
public const VERSION = '0.15.3';
public const VERSION = '0.15.4';

public static function qualifiedVersion(): string
{
Expand Down

0 comments on commit 4bd0b39

Please sign in to comment.