131 lines (130 loc) · 3.61 KB
/
test.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
---
name: Test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
lint:
name: Rubocop
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: "2.4"
- name: Set up Gems
run: |
gem update --system --no-document
gem install bundler --no-document
bundle install --jobs 4 --retry 3 --path=.bundle
- name: Lint
run: bundle exec rubocop
main:
name: Main
timeout-minutes: 30
strategy:
matrix:
os: ["ubuntu-latest"]
redis: ["5.0"]
ruby: ["2.7", "2.6", "2.5", "2.4"]
driver: ["ruby", "hiredis", "synchrony"]
runs-on: ${{ matrix.os }}
env:
VERBOSE: true
TIMEOUT: 30
LOW_TIMEOUT: 0.01
DRIVER: ${{ matrix.driver }}
REDIS_BRANCH: ${{ matrix.redis }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Print environment variables
run: |
echo "TIMEOUT=${TIMEOUT}"
echo "LOW_TIMEOUT=${LOW_TIMEOUT}"
echo "DRIVER=${DRIVER}"
echo "REDIS_BRANCH=${REDIS_BRANCH}"
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Cache dependent gems
uses: actions/cache@v1
with:
path: .bundle
key: "local-bundle-ruby-${{ matrix.ruby }}-on-${{ matrix.os }}-0001"
- name: Set up Gems
run: |
gem update --system --no-document
gem install bundler --no-document
bundle install --jobs 4 --retry 3 --path=.bundle
- name: Cache local temporary directory
uses: actions/cache@v1
with:
path: tmp
key: "local-tmp-redis-${{ matrix.redis }}-on-${{ matrix.os }}"
- name: Booting up Redis
run: make start_all
- name: Test
run: make test
env:
RUBYOPT: "--enable-frozen-string-literal"
- name: Shutting down Redis
run: make stop_all
sub:
name: Sub
timeout-minutes: 30
strategy:
matrix:
os: ["ubuntu-latest"]
redis: ["5.0", "4.0", "3.2", "3.0"]
ruby: ["jruby-9.2.9.0", "2.3"]
driver: ["ruby"]
runs-on: ${{ matrix.os }}
env:
VERBOSE: true
TIMEOUT: 30
LOW_TIMEOUT: 0.07
DRIVER: ${{ matrix.driver }}
REDIS_BRANCH: ${{ matrix.redis }}
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Print environment variables
run: |
echo "TIMEOUT=${TIMEOUT}"
echo "LOW_TIMEOUT=${LOW_TIMEOUT}"
echo "DRIVER=${DRIVER}"
echo "REDIS_BRANCH=${REDIS_BRANCH}"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Cache dependent gems
uses: actions/cache@v1
with:
path: .bundle
key: "local-bundle-ruby-${{ matrix.ruby }}-on-${{ matrix.os }}-0001"
- name: Set up Gems
run: |
gem update --system --no-document
gem install bundler --no-document
bundle install --jobs 4 --retry 3 --path=.bundle
- name: Cache local temporary directory
uses: actions/cache@v1
with:
path: tmp
key: "local-tmp-redis-${{ matrix.redis }}-on-${{ matrix.os }}"
- name: Booting up Redis
run: make start_all
- name: Test
run: make test
- name: Shutting down Redis
run: make stop_all