Skip to content

Commit e939865

Browse files
authored
Create ci.yml (#421)
Setup CI using GitHub Actions. * Use rubysetup-ruby@v1 * A conditional matrix build failures.
1 parent 5df84c6 commit e939865

2 files changed

Lines changed: 50 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This workflow runs continuous CI across different versions of ruby on all branches and pull requests to develop.
2+
3+
name: CI
4+
5+
# Controls when the action will run.
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the develop branch
8+
push:
9+
branches: [ '**' ]
10+
pull_request:
11+
branches: [ develop ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
tests:
20+
name: Ruby ${{ matrix.ruby }}
21+
if: "contains(github.event.commits[0].message, '[ci skip]') == false"
22+
runs-on: ubuntu-latest
23+
env:
24+
CI: true
25+
ALLOW_FAILURES: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'jruby' }}
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
ruby:
30+
- 2.4
31+
- 2.5
32+
- 2.6
33+
- 2.7
34+
- ruby-head
35+
- jruby
36+
steps:
37+
- name: Clone repository
38+
uses: actions/checkout@v2
39+
- name: Set up Ruby
40+
uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: ${{ matrix.ruby }}
43+
- name: Install dependencies
44+
run: bundle install --jobs 4 --retry 3
45+
- name: Run tests
46+
run: bundle exec rspec spec || $ALLOW_FAILURES
47+

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ This is a pure-Ruby library for working with [Resource Description Framework
66
* <https://ruby-rdf.github.com/rdf>
77

88
[![Gem Version](https://badge.fury.io/rb/rdf.png)](https://badge.fury.io/rb/rdf)
9-
[![Build Status](https://travis-ci.org/ruby-rdf/rdf.png?branch=master)](https://travis-ci.org/ruby-rdf/rdf)
10-
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf/badge.svg)](https://coveralls.io/r/ruby-rdf/rdf)
11-
[![Join the chat at https://gitter.im/ruby-rdf/rdf](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ruby-rdf/rdf?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
12-
9+
![Build Status](https://github.com/ruby-rdf/rdf/workflows/CI/badge.svg?branch=develop)
10+
[![Coverage Status](https://coveralls.io/repos/ruby-rdf/rdf/badge.svg)]
11+
![Join the chat at https://gitter.im/ruby-rdf/rdf](https://badges.gitter.im/Join%20Chat.svg)]
1312
## Features
1413

1514
* 100% pure Ruby with minimal dependencies and no bloat.

0 commit comments

Comments
 (0)