diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..c278a1cc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,61 @@ +name: CI + +on: +- push +- pull_request + +jobs: + host: + name: ${{ matrix.os }} ${{ matrix.ruby }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-20.04 + - ubuntu-18.04 + - macos-11.0 + - macos-10.15 + - windows-latest + ruby: + - '3.0' + - 2.7 + - 2.6 + - 2.5 + - 2.4 + - 2.3 + - debug + include: + - { os: windows-latest , ruby: mingw } + - { os: windows-latest , ruby: mswin } + - { os: ubuntu-latest , ruby: jruby-9.1 } # Ruby 2.3 + - { os: ubuntu-latest , ruby: jruby-9.2 } # Ruby 2.5 + - { os: ubuntu-latest , ruby: truffleruby } + exclude: + - { os: windows-latest , ruby: '3.0' } + - { os: windows-latest , ruby: debug } + + steps: + - uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + + - run: sudo apt install ragel + if: ${{ startsWith(matrix.os, 'ubuntu') }} + + - run: brew install ragel + if: ${{ startsWith(matrix.os, 'macos') }} + + - run: bundle install + + - run: rake compile + + - run: rake test + + - run: rake build + + - run: gem install pkg/*.gem + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 38a85841..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Passes arguments to bundle install (http://gembundler.com/man/bundle-install.1.html) -#bundler_args: --binstubs -language: ruby - -# Specify which ruby versions you wish to run your tests on, each version will be used -rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - - 2.7 - - ruby-head - - jruby-9.1 # Ruby 2.3 - - jruby-9.2 # Ruby 2.5 - - truffleruby -matrix: - allow_failures: - - rvm: ruby-head - - rvm: truffleruby -script: "bundle exec rake" -sudo: false