Skip to content

Commit bb1c8fb

Browse files
authored
Merge pull request #408 from JsonApiClient/github-actions-integration
Create ruby.yml
2 parents 4277a86 + 47858ba commit bb1c8fb

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

.github/workflows/ruby.yml

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7+
8+
name: Ruby
9+
10+
on:
11+
push:
12+
branches: [ "master" ]
13+
pull_request:
14+
branches: [ "master" ]
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
ruby: [2.2, 2.3, 2.4, 2.5, 2.6 2.7]
26+
rails: ["4.1", "4.2", "5.0", "5.2.3", "6.0"]
27+
exclude:
28+
- ruby: "2.4"
29+
rails: "4.1"
30+
- ruby: "2.4"
31+
rails: "4.2"
32+
- ruby: "2.4"
33+
rails: "6.0"
34+
- ruby: "2.5"
35+
rails: "4.1"
36+
- ruby: "2.5"
37+
rails: "4.2"
38+
- ruby: "2.6"
39+
rails: "4.1"
40+
- ruby: "2.6"
41+
rails: "4.2"
42+
- ruby: "2.7"
43+
rails: "4.1"
44+
- ruby: "2.7"
45+
rails: "4.2"
46+
include:
47+
- rails: "master"
48+
continue-on-error: true
49+
50+
steps:
51+
- uses: actions/checkout@v3
52+
- name: Set up Ruby
53+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
54+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
55+
# uses: ruby/setup-ruby@v1
56+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
57+
with:
58+
ruby-version: ${{ matrix.ruby-version }}
59+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
60+
- name: Run tests
61+
run: bundle exec rake

0 commit comments

Comments
 (0)