From 4946f2fb131c6c1db0a842b83bcbbc54ef300392 Mon Sep 17 00:00:00 2001 From: SaadYousaf Date: Wed, 27 Sep 2023 13:11:48 +0500 Subject: [PATCH] feat: add ruby 3.1 ci pipeline for tests --- .github/workflows/ci.yml | 12 ++++++++++-- Gemfile3 | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b85e5f3106..6370943fd8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,12 +13,15 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - ruby-version: ['3.0.4'] + ruby-version: ['3.0.4', '3.1.0'] mongodb-version: ['4.2.14'] include: - ruby-version: 3.0.4 gemfile: Gemfile3 allow-failure: false + - ruby-version: 3.1.0 + gemfile: Gemfile3 + allow-failure: false env: SEARCH_SERVER_ES7: http://localhost:9200 MONGOHQ_URL: mongodb://localhost:27017/cs_comments_service_test @@ -54,7 +57,12 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} - bundler-cache: true + + - name: Configuring nokogiri gem to use native extensions + run: bundle config build.nokogiri --use-system-libraries + + - name: Install packages required for nokogiri package + run: sudo apt-get install libxslt-dev libxml2-dev - name: Install dependencies run: bundle install diff --git a/Gemfile3 b/Gemfile3 index 3e13228eb8..9647db17f8 100644 --- a/Gemfile3 +++ b/Gemfile3 @@ -37,6 +37,7 @@ gem 'mongoid_magic_counter_cache' gem 'will_paginate_mongoid', "~>2.0" gem 'rdiscount' gem 'nokogiri', "~> 1.8.1" +gem 'pkg-config', "~> 1.1" gem 'elasticsearch', '~> 7.8.0' gem 'elasticsearch-model', '~> 7.1.0'