Skip to content

Commit

Permalink
Switch from Travis CI to GitHub Actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Apr 29, 2023
1 parent 819bf31 commit 2177add
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 19 deletions.
89 changes: 89 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Tests

on: [push, pull_request]

jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu]
ruby: ['2.5', '2.6', '2.7', '3.0', '3.1', '3.2', head, jruby, jruby-head, truffleruby, truffleruby-head]
include:
- os: macos
ruby: '3.0'
- os: windows
ruby: '3.0'
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.os == 'windows' }}
steps:
- name: Checkout rubyzip code
uses: actions/checkout@v3

- name: Install and set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run the tests
env:
RUBYOPT: -v
JRUBY_OPTS: --debug
run: bundle exec rake

- name: Coveralls
if: matrix.os == 'ubuntu' && !endsWith(matrix.ruby, 'head')
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: ${{ matrix.ruby }}
parallel: true

test-isolated:
runs-on: ubuntu-latest
steps:
- name: Checkout rubyzip code
uses: actions/checkout@v3

- name: Install and set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
bundler-cache: true

- name: Run isolated tests
run: bundle exec rake test:isolated

test-yjit:
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: ['3.1', '3.2', head]
runs-on: ${{ matrix.os }}-latest
continue-on-error: true
steps:
- name: Checkout rubyzip code
uses: actions/checkout@v3

- name: Install and set up ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run the tests
env:
RUBYOPT: --enable-yjit -v
run: bundle exec rake

finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

0 comments on commit 2177add

Please sign in to comment.