From 64ac3540a282b1fcea32016bb9497a08f1bd5553 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Wed, 14 Jun 2023 11:22:26 -0300 Subject: [PATCH 1/2] Create .yamllint.yml --- .yamllint.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .yamllint.yml diff --git a/.yamllint.yml b/.yamllint.yml new file mode 100644 index 00000000..0292b934 --- /dev/null +++ b/.yamllint.yml @@ -0,0 +1,9 @@ +extends: default +ignore: | + node_modules +rules: + comments-indentation: disable + line-length: disable + document-start: disable + brackets: disable + truthy: disable From 969dd7146f3920292b3fe1813a757d639351b01b Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Thu, 3 Aug 2023 15:48:34 -0300 Subject: [PATCH 2/2] Fix yaml files & add yaml lint to CI --- .code-samples.meilisearch.yaml | 6 +-- .github/dependabot.yml | 36 +++++++++--------- .github/workflows/gempush.yml | 34 ++++++++--------- .github/workflows/pre-release-tests.yml | 26 ++++++------- .github/workflows/tests.yml | 50 +++++++++++++++---------- docker-compose.yml | 2 +- 6 files changed, 82 insertions(+), 72 deletions(-) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index a04100ad..2447ba9e 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -5,13 +5,13 @@ --- get_documents_post_1: |- client.index('books').get_documents( - filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English', - limit: 3, + filter: '(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English', + limit: 3, fields: ['title', 'genres', 'rating', 'language'] ) delete_documents_by_filter_1: |- client.index('movies').get_documents(filter: 'genres = action OR genres adventure') -get_documents_1: |- +get_documents_1: |- client.index('movies').get_documents(limit: 2, filter: 'genres = action') getting_started_faceting: |- client.index('movies').update_faceting(max_values_per_facet: 2) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 884e36ed..bd21d058 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,21 +1,21 @@ version: 2 updates: -- package-ecosystem: "github-actions" - directory: "/" - schedule: - interval: "monthly" - labels: - - 'skip-changelog' - - 'dependencies' - rebase-strategy: disabled + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" + labels: + - 'skip-changelog' + - 'dependencies' + rebase-strategy: disabled -- package-ecosystem: bundler - directory: "/" - schedule: - interval: "monthly" - time: "04:00" - open-pull-requests-limit: 10 - labels: - - skip-changelog - - dependencies - rebase-strategy: disabled + - package-ecosystem: bundler + directory: "/" + schedule: + interval: "monthly" + time: "04:00" + open-pull-requests-limit: 10 + labels: + - skip-changelog + - dependencies + rebase-strategy: disabled diff --git a/.github/workflows/gempush.yml b/.github/workflows/gempush.yml index 06e47101..6b3de28a 100644 --- a/.github/workflows/gempush.yml +++ b/.github/workflows/gempush.yml @@ -11,20 +11,20 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - name: Set up Ruby 2.6 - uses: actions/setup-ruby@v1 - with: - ruby-version: 2.6.x - - name: Check release validity - run: sh .github/scripts/check-release.sh - - name: Publish to RubyGems - run: | - mkdir -p $HOME/.gem - touch $HOME/.gem/credentials - chmod 0600 $HOME/.gem/credentials - printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials - gem build meilisearch.gemspec - gem push *.gem - env: - GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} + - uses: actions/checkout@v3 + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Check release validity + run: sh .github/scripts/check-release.sh + - name: Publish to RubyGems + run: | + mkdir -p $HOME/.gem + touch $HOME/.gem/credentials + chmod 0600 $HOME/.gem/credentials + printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials + gem build meilisearch.gemspec + gem push *.gem + env: + GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}} diff --git a/.github/workflows/pre-release-tests.yml b/.github/workflows/pre-release-tests.yml index 73e616d5..9e8d80dc 100644 --- a/.github/workflows/pre-release-tests.yml +++ b/.github/workflows/pre-release-tests.yml @@ -17,16 +17,16 @@ jobs: name: integration-tests-against-rc (ruby ${{ matrix.ruby-version }}) runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - name: Set up Ruby ${{ matrix.ruby-version }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - name: Install ruby dependencies - run: bundle install --with test - - 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: Run test suite - run: bundle exec rspec + - uses: actions/checkout@v3 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install ruby dependencies + run: bundle install --with test + - 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: Run test suite + run: bundle exec rspec diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a4a021d4..ac8db27a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,28 +21,38 @@ jobs: name: integration-tests (ruby ${{ matrix.ruby-version }}) runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - name: Set up Ruby ${{ matrix.ruby-version }} - uses: ruby/setup-ruby@v1 - with: - ruby-version: ${{ matrix.ruby-version }} - - name: Install ruby dependencies - run: bundle install --with test - - name: Meilisearch (latest) setup with Docker - run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics - - name: Run test suite - run: bundle exec rspec + - uses: actions/checkout@v3 + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - name: Install ruby dependencies + run: bundle install --with test + - name: Meilisearch (latest) setup with Docker + run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics + - name: Run test suite + run: bundle exec rspec linter_check: name: linter-check runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v3 - - name: Set up Ruby - uses: ruby/setup-ruby@v1 - with: - ruby-version: 3.0 - - name: Install ruby dependencies - run: bundle install --with test - - name: Run linter - run: bundle exec rubocop lib/ spec/ + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0 + - name: Install ruby dependencies + run: bundle install --with test + - name: Run linter + run: bundle exec rubocop lib/ spec/ + + yaml-lint: + name: Yaml linting check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Yaml lint check + uses: ibiqlik/action-yamllint@v3 + with: + config_file: .yamllint.yml diff --git a/docker-compose.yml b/docker-compose.yml index 127c4c28..9f9036a5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: - bundle:/vendor/bundle meilisearch: - image: getmeili/meilisearch:latest + image: getmeili/meilisearch:v1.3.0 ports: - "7700" environment: