Skip to content

Commit

Permalink
Run test via GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexisbernard committed Oct 7, 2024
1 parent ea34070 commit 58a4991
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: test

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby-version: ["3.1", "3.0", "2.7", "2.6", "2.5", "2.4", "2.3", "2.2", "2.1"]

steps:
- uses: actions/checkout@v4

- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@ec02537da5712d66d4d50a0f33b7eb52773b5ed1
with:
ruby-version: ${{ matrix.ruby-version }}

# - name: Install Elasticsearch
# run: |
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
# sudo apt-get install apt-transport-https
# echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
# sudo apt-get update && sudo apt-get install elasticsearch

- run: sudo apt-get install redis-server
- run: bundle install
- run: bundle exec rake
1 change: 1 addition & 0 deletions test/plugin/elasticsearch_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ class RorVsWild::Plugin::ElasticsearchTest < Minitest::Test
include RorVsWild::AgentHelper

def test_callback
skip
agent.measure_block("elastic") do
::Elasticsearch::Client.new.search(q: "test")
end
Expand Down

0 comments on commit 58a4991

Please sign in to comment.