Skip to content

Add yaml linting check in CI #684

Add yaml linting check in CI

Add yaml linting check in CI #684

Workflow file for this run

name: Tests
on:
pull_request:
push:
# trying and staging branches are for Bors config
branches:
- trying
- staging
- main
jobs:
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')
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby-version: ["2.6", "2.7", "3.0", "3.1"]
rails-version: [5.2, 6.1, 7.0]
exclude:
- ruby-version: "3.0"
rails-version: 5.2
- ruby-version: "3.1"
rails-version: 5.2
- ruby-version: "2.6"
rails-version: 7.0
env:
RAILS_VERSION: ${{ matrix.rails-version }}
name: integration-tests (Rails ${{ matrix.rails-version }} with Ruby ${{ matrix.ruby-version }})
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Meilisearch (latest) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run tests
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
env:
BUNDLE_WITH: test
with:
ruby-version: 2.6
bundler-cache: true
- 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
smoke-test:
name: smoke-test
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
env:
BUNDLE_WITHOUT: test
BUNDLE_GEMFILE: ./playground/Gemfile
with:
ruby-version: 2.6.9
bundler-cache: true
- name: Meilisearch (latest) setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --master-key=masterKey --no-analytics
- name: Run smoke tests
working-directory: ./playground
run: |
bundle install
bundle exec rake db:setup meilisearch:reindex meilisearch:clear_indexes