-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (59 loc) · 2.16 KB
/
tox.yml
File metadata and controls
70 lines (59 loc) · 2.16 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
name: Run Tests using tox
on:
pull_request:
push:
branches:
- master
jobs:
pytest:
strategy:
matrix:
python-version: [ '3.11', '3.12', '3.13', '3.14' ]
fail-fast: false
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
USING_COVERAGE: "3.11"
USING_COVERAGE_OS: "ubuntu-latest"
runs-on: "ubuntu-latest"
name: os ${{ matrix.os }} python ${{ matrix.python-version }} Linting, testing, and compliance
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install Dev requirements
run: |
pip install -U setuptools wheel
pip install -r dev_requirements.txt
- name: Set Submodules
run: |
git submodule update --init --recursive
- name: Install Redis and memtier_benchmark
run: |
sudo apt install lsb-release curl gpg -y
curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list
sudo apt-get update
sudo apt-get install redis memtier-benchmark -y
sudo systemctl stop redis-server
echo "memtier_benchmark version"
memtier_benchmark --version
- name: Install ftsb
run: |
wget -c https://github.com/RediSearch/ftsb/releases/latest/download/ftsb_redisearch_$(uname -mrs | awk '{ print tolower($1) }')_$(dpkg --print-architecture).tar.gz -O - | tar -xz
sudo mv ftsb_redisearch /usr/local/bin/
- name: Run tox
env:
TOX_DOCKER_GATEWAY: "0.0.0.0"
run: |
tox
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
if: contains(env.USING_COVERAGE, matrix.python-version)
with:
token: ${{secrets.CODECOV_TOKEN}}
fail_ci_if_error: true