From 7879a9e21d42db4c99ab40e9dbd5ab9a83342c70 Mon Sep 17 00:00:00 2001 From: John Nunemaker Date: Wed, 12 Oct 2022 10:25:23 -0400 Subject: [PATCH] Add ci task for github actions The goal is to prevent failures from slipping into the code base. When I forked and worked on https://github.com/mailjet/mailjet-gem/pull/237, I found that the specs were failing locally and showing the bug even before I made the fix. --- .github/ci.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/ci.yml diff --git a/.github/ci.yml b/.github/ci.yml new file mode 100644 index 0000000..564f0a9 --- /dev/null +++ b/.github/ci.yml @@ -0,0 +1,26 @@ +name: CI +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: + - 2.2 + - 2.3 + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - '3.0' # Quoted, to avoid YAML float 3.0 interplated to "3" + - 3.1 + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true # Run "bundle install", and cache the result automatically. + - name: Run Rake + run: bundle exec rake