-
-
Notifications
You must be signed in to change notification settings - Fork 39
73 lines (66 loc) · 2.07 KB
/
ci.yaml
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
---
name: CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
schedule:
# Run the workflow once per month
- cron: "0 0 1 * *"
jobs:
rubocop:
name: Rubocop
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1.4
- name: rubocop
uses: reviewdog/action-rubocop@v2
with:
rubocop_version: gemfile
rubocop_extensions: rubocop-rake:gemfile rubocop-rspec:gemfile rubocop-performance:gemfile
reporter: github-pr-review
fail_on_error: true
test:
needs: rubocop
runs-on: ubuntu-latest
name: Ruby ${{ matrix.ruby }} / Sidekiq ${{ matrix.sidekiq }}
# Don't stop testing if the latest version has failures
continue-on-error: ${{ matrix.ruby == 'latest' || matrix.sidekiq == 'latest' }}
strategy:
matrix:
# Always keep a window of "5 most recent supperted"
# including (or on top with) HEAD
ruby: ["3.0.6", "3.1.4", "3.2.3", "3.3.0", "latest"]
sidekiq: ["4.1.0", "4.x", "5.x", "6.x", "7.x", "latest"]
# Allow failures ... kind-a
exclude:
- ruby: "3.0.6"
sidekiq: "latest"
- ruby: "3.1.4"
sidekiq: "latest"
- ruby: "3.2.3"
sidekiq: "latest"
- ruby: "3.3.0"
sidekiq: "latest"
container:
image: ruby:${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: vendor-cache
with:
path: vendor
key: bundle-${{ matrix.ruby }}-sidekiq-${{ matrix.sidekiq }}-${{ hashFiles('**/*.gemspec') }}-${{ hashFiles('**/.*Gemfile.lock') }}
- name: Upgrade Bundler to 2.x (for older Ruby versions)
run: gem install bundler -v '~> 2.1'
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle config gemfile gemfiles/sidekiq_${{ matrix.sidekiq }}.Gemfile
bundle install
- name: Run RSpec
run: bundle exec rake spec