Skip to content

Commit

Permalink
Travis -> GHA (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
UserNotFound authored Jul 3, 2024
1 parent 1ae0a33 commit 498a5ec
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 20 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
pull_request:
branches:
- main
- master
push:
branches:
- main
- master

jobs:
test:
name: Build and Publish
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
ruby-version: [2.1, 2.2, 2.3, 2.4, 2.5, 2.6, 2.7]
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: 1.17.3
bundler-cache: true

- name: Test
run: bundle exec rake

- name: Sync README
run: |
bundle exec script/sync-readme-usage
git diff --exit-code
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')
}}
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

0 comments on commit 498a5ec

Please sign in to comment.