From 38a0408aa577759842914ea9445275cd0acbed02 Mon Sep 17 00:00:00 2001 From: Alexis Bernard Date: Mon, 7 Oct 2024 11:13:33 +0200 Subject: [PATCH] Run test via GitHub actions --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..8dd1cf5 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: test + +on: [push, pull_request] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + ruby-version: ["head", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@1 + 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