-
Notifications
You must be signed in to change notification settings - Fork 18
77 lines (75 loc) · 2.34 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Tests
on:
pull_request:
push:
branches:
- '**'
tags-ignore:
- 'v*'
jobs:
test:
name: "GraphQL-Ruby ${{ matrix.graphql }} on Ruby ${{ matrix.ruby }} (use_client_id: ${{ matrix.client_id }}) Redis v${{ matrix.redis_version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: "3.2"
graphql: '~> 2.2.5'
client_id: 'false'
anycable_rails: '~> 1.4'
rails: '~> 7.1'
redis_version: latest
- ruby: "3.1"
graphql: '~> 2.0.0'
client_id: 'false'
anycable_rails: '~> 1.3'
rails: '~> 7.0'
redis_version: latest
- ruby: "3.0"
graphql: '~> 1.13.0'
client_id: 'false'
anycable_rails: '~> 1.2.0'
rails: '~> 6.1'
redis_version: 5.0.4
- ruby: 2.7
graphql: '~> 1.12.0'
client_id: 'true'
anycable_rails: '~> 1.1.0'
rails: '~> 6.0'
redis_version: 4.0.14
container:
image: ruby:${{ matrix.ruby }}
env:
CI: true
GRAPHQL_RUBY_VERSION: ${{ matrix.graphql }}
ANYCABLE_RAILS_VERSION: ${{ matrix.anycable_rails }}
RAILS_VERSION: ${{ matrix.rails }}
GRAPHQL_ANYCABLE_USE_CLIENT_PROVIDED_UNIQ_ID: ${{ matrix.client_id }}
REDIS_URL: redis://redis:6379
services:
redis:
image: redis:${{ matrix.redis_version }}
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: vendor/bundle
key: bundle-${{ matrix.ruby }}-${{ matrix.graphql }}-${{ matrix.anycable }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/Gemfile') }}
restore-keys: |
bundle-${{ matrix.ruby }}-${{ matrix.graphql }}-${{ matrix.anycable }}-
bundle-${{ matrix.ruby }}-
- name: Upgrade Bundler to 2.0 (for older Rubies)
run: gem install bundler -v '~> 2.0'
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install
bundle update
- name: Run RSpec
run: bundle exec rspec