-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (78 loc) · 2.11 KB
/
tests.yml
File metadata and controls
86 lines (78 loc) · 2.11 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
84
85
86
name: Tests
on: [push]
jobs:
ruby-tests:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
strategy:
fail-fast: false
matrix:
ruby:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
# - '3.4'
# - 'truffleruby'
steps:
- uses: actions/checkout@v2
- name: Install deps
run: |
sudo apt-get install libsnappy-dev
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Add MiniTest compatibility shim
run: |
cat << 'EOF' > ruby/test/minitest_compat.rb
# Compatibility shim for legacy MiniTest constant (pre-5.0)
require 'minitest'
unless defined?(MiniTest)
MiniTest = Minitest
end
EOF
# Add require to files
sed -i '5i require_relative "minitest_compat"' ruby/test/test_helper.rb
sed -i '5i require_relative "../../test/minitest_compat"' ruby/lib/minitest/queue.rb
- name: Run Ruby tests
run: |
bin/before-install
bin/test
env:
SUITE: ruby
REDIS_HOST: localhost
RUBYOPT: "-W0"
python-tests:
if: false # Disable python tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
services:
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Install Python ${{ matrix.python }}
run: |
sudo add-apt-repository -y ppa:deadsnakes/ppa
sudo apt-get -qq update
sudo apt-get install -y python${{ matrix.python }} python${{ matrix.python }}-distutils
sudo pip install autopep8
- name: Run Python tests
run: |
bin/before-install
bin/test
env:
SUITE: python
PYTHON_VERSION: ${{ matrix.python }}
REDIS_HOST: localhost
REDIS_PORT: 6379