Skip to content

Merge pull request #37 from prog-supdex/feat/add-stats #160

Merge pull request #37 from prog-supdex/feat/add-stats

Merge pull request #37 from prog-supdex/feat/add-stats #160

Workflow file for this run

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.1"
graphql: '~> 2.0.0'
client_id: 'false'
anycable_rails: '~> 1.3'
redis_version: latest
- ruby: "3.0"
graphql: '~> 1.13.0'
client_id: 'false'
anycable_rails: '~> 1.2.0'
redis_version: 5.0.4
- ruby: 2.7
graphql: '~> 1.12.0'
client_id: 'true'
anycable_rails: '~> 1.1.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 }}
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