diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..fdb5a60 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,47 @@ +name: Tests + +on: + pull_request: + branches: + - main + - master + push: + branches: + - main + - master + +jobs: + test: + name: Test Ruby ${{ matrix.RUBY_VERSION }} + runs-on: ubuntu-20.04 + strategy: + fail-fast: false + matrix: + RUBY_VERSION: ["2.0", "2.1", "2.2", "2.3", "3.0"] + steps: + - name: Check out code + uses: actions/checkout@v4 + + - name: Install Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.RUBY_VERSION }} + bundler-cache: true + bundler: 1.13.6 + + - name: Run Tests + run: bundle exec rake + + results: + if: ${{ always() }} + runs-on: ubuntu-latest + name: Final Results + needs: [test] + steps: + - run: exit 1 + # see https://stackoverflow.com/a/67532120/4907315 + if: >- + ${{ + contains(needs.*.result, 'failure') + || contains(needs.*.result, 'cancelled') + }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 026569a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -sudo: false -language: ruby - -rvm: - - "2.0" - - "2.1" - - "2.2" - - "2.3" - -before_install: gem install bundler -v 1.13.6 diff --git a/spec/spawn_passthrough_spec.rb b/spec/spawn_passthrough_spec.rb index 9a08c2e..f2c6905 100644 --- a/spec/spawn_passthrough_spec.rb +++ b/spec/spawn_passthrough_spec.rb @@ -1,4 +1,5 @@ require 'spec_helper' +require 'tmpdir' describe SpawnPassthrough do it 'has a version number' do