From 9d733b9429fc6273f09dd935e0210cc53f6f77ae Mon Sep 17 00:00:00 2001 From: Nicolas Rodriguez Date: Thu, 22 Aug 2024 02:00:14 +0200 Subject: [PATCH] Setup GitHub Actions for CI Closes #206 #188 --- .github/workflows/main.yml | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 00000000..2d43edaa --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,55 @@ +--- +name: Tests + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + fail-fast: false + matrix: + ruby: + - '3.3' + - '3.2' + - '3.1' + - '3.0' + - 'head' + - jruby + - jruby-head + - truffleruby + - truffleruby-head + + steps: + - uses: actions/checkout@v4 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - name: Update bundler + env: + RUBY_VERSION: ${{ matrix.ruby }} + run: | + case ${RUBY_VERSION} in + truffleruby|truffleruby-head) + gem install bundler -v 2.5.18 + ;; + + *) + gem update --system + ;; + esac + + bundle install + + - name: Run tests + run: bin/rspec