forked from defunkt/resque-lock
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.27 KB
/
ci.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
name: CI
on:
push:
branches: [$default-branch]
pull_request:
jobs:
test:
name: tests / ruby
runs-on: ubuntu-latest
services:
redis:
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
strategy:
matrix:
ruby-version: ['2.7.7', '3.0']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/[email protected]
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
cache-version: 1
- name: Install dependencies
run: bundle install --jobs 4
- name: Run tests
run: bundle exec rake
rubocop:
name: linters / rubocop
runs-on: ubuntu-latest
env:
RUBY_VERSION: 2.7.7
steps:
- name: Codebase Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/[email protected]
with:
ruby-version: ${{ env.RUBY_VERSION }}
bundler-cache: true
cache-version: 1
- name: rubocop
run: bundle exec rubocop