From 97445fcfa38969b7e2b9907058d7fd1843c8d476 Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 28 Mar 2024 10:29:04 +0100 Subject: [PATCH] Setup GitHub Actions --- .github/workflows/ci.yml | 37 ++++++++++++++++++++++++++++++++++ .github/workflows/isolated.yml | 20 ++++++++++++++++++ .travis.yml | 36 --------------------------------- 3 files changed, 57 insertions(+), 36 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/isolated.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..7fbaf0f73 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI +on: [push, pull_request] +jobs: + tests: + runs-on: ubuntu-latest + continue-on-error: ${{ matrix.experimental }} + name: ${{ matrix.ruby }} + strategy: + matrix: + experimental: [false] + ruby: + - "2.5" + - "2.6" + - "2.7" + - "3.0" + - "3.1" + - "3.2" + - "3.3" + include: + - { ruby: "3.3", rubyopt: "--enable-frozen-string-literal" } + - { ruby: jruby, experimental: true } + - { ruby: jruby-head, experimental: true } + - { ruby: truffleruby, experimental: true } + - { ruby: truffleruby-head, experimental: true } + - { ruby: head, experimental: true } + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + timeout-minutes: 10 + run: bundle exec rake RUBYOPT="${{ matrix.rubyopt }}" diff --git a/.github/workflows/isolated.yml b/.github/workflows/isolated.yml new file mode 100644 index 000000000..b617dac4f --- /dev/null +++ b/.github/workflows/isolated.yml @@ -0,0 +1,20 @@ +name: CI isolated tests +on: [push, pull_request] +jobs: + tests: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [2.7] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + run: bundle exec rake test_isolated diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d9c9b8027..000000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: ruby - -cache: bundler - -sudo: false - -rvm: - - 2.0.0 - - 2.1 - - 2.2 - - 2.3.1 - - 2.4.0-rc1 - -matrix: - include: - test_isolated - -matrix: - include: - - rvm: 1.9.3 - gemfile: gemfiles/Gemfile-1.9 - - rvm: 2.2 - script: bundle exec rake test_isolated - -notifications: - email: false - irc: - on_success: change - on_failure: always - channels: - - "irc.freenode.org#rails-contrib" - campfire: - on_success: change - on_failure: always - rooms: - - secure: "bJyiK4EXGfm0EhAId/QqIEdhPCx8BjxUKvx1h0+wgrsUm8BDoEN7tg2wqoGWU2KfzqLdx77wZVQXbmksOgmNcMGKJed5uNNMpAG4B+AQYTEX0odFRgOZKdkMtypga9CNIkKVgeSKhd6BY+g2AV6wvJ0Jq056uXpGkqK5OEFOpQc="