-
-
Notifications
You must be signed in to change notification settings - Fork 413
83 lines (73 loc) · 2.57 KB
/
_test-matrix.yml
File metadata and controls
83 lines (73 loc) · 2.57 KB
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
78
79
80
81
82
83
name: _Test Matrix
on:
workflow_call:
inputs:
bundler-cache:
description: Enable Bundler cache
required: false
type: boolean
default: false
secrets:
CODECOV_TOKEN:
required: false
permissions:
contents: read
jobs:
test:
name: Test (${{ matrix.ruby-version }} / ${{ matrix.rails-version }})
runs-on: ubuntu-latest
env:
BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: "true"
strategy:
matrix:
ruby-version: ["3.1", "3.2", "3.3", "3.4", "4.0", "jruby-10.0.2.0"]
rails-version: ["rails-7.1", "rails-7.2", "rails-8.0", "rails-8.1"]
exclude:
- ruby-version: "3.1"
rails-version: "rails-8.0"
- ruby-version: "3.1"
rails-version: "rails-8.1"
- ruby-version: "jruby-10.0.2.0"
rails-version: "rails-8.1"
- ruby-version: "jruby-10.0.2.0"
rails-version: "rails-8.0"
- ruby-version: "jruby-10.0.2.0"
rails-version: "rails-7.2"
steps:
- uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: ${{ inputs.bundler-cache }}
- name: Install dependencies
run: |
bundle install
bundle exec appraisal ${{ matrix.rails-version }} bundle install
- name: Run tests
if: matrix.ruby-version != '4.0' || matrix.rails-version != 'rails-8.1'
run: bundle exec appraisal ${{ matrix.rails-version }} bin/rspec-queue
env:
SPEC_OPTS: --tag ~generator
SKIP_COVERAGE: true
- name: Run full test suite with coverage (latest Ruby/Rails)
if: matrix.ruby-version == '4.0' && matrix.rails-version == 'rails-8.1'
run: bundle exec appraisal ${{ matrix.rails-version }} bin/rspec-queue
- name: Upload coverage to Codecov
if: matrix.ruby-version == '4.0' && matrix.rails-version == 'rails-8.1'
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./coverage/coverage.xml
fail_ci_if_error: false
- name: Run the test suite with Faraday v1
if: matrix.ruby-version != '4.0'
run: |
FARADAY_VERSION=1.10.3 bundle install
bundle exec appraisal ${{ matrix.rails-version }} bundle install
bundle exec appraisal ${{ matrix.rails-version }} bin/rspec-queue
env:
SPEC_OPTS: --tag ~generator
SKIP_COVERAGE: true