-
Notifications
You must be signed in to change notification settings - Fork 39
90 lines (84 loc) · 2.64 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
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: yandex-taxi-testsuite package tests
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- '3.6'
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
steps:
- name: Install database dependencies
run: |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 8919F6BD2B48D754
echo "deb https://packages.clickhouse.com/deb stable main" | sudo tee \
/etc/apt/sources.list.d/clickhouse.list
sudo apt-get update
sudo apt-get install -y redis-server clickhouse-common-static=22.3.2.2
- uses: actions/checkout@v2
- name: Install Kafka
run: |
sudo apt-get install -y default-jre
curl https://dlcdn.apache.org/kafka/3.8.0/kafka_2.13-3.8.0.tgz -o kafka.tgz
sudo mkdir -p /etc/kafka
sudo tar xf kafka.tgz --directory=/etc/kafka
cd /etc/kafka
sudo cp -r kafka_2.13-3.8.0/* ./
sudo rm -rf kafka_2.13-3.8.0
- name: Install RabbitMQ
run: |
.github/install-rabbitmq.sh
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
run: |
python -m pip install --upgrade pip wheel virtualenv pytest
make setup-dev-venv
- name: Lint with flake8
run: |
make venv-linters
- name: Check PEP8 with black
run: |
make venv-check-black
- name: Test with pytest
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-vvs"
run: |
make venv-tests
- name: Run examples tests
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST: pytest
PYTEST_ARGS: "-vvs"
run: |
make venv-test-examples
- name: Rerun mysql tests with MariaDB
env:
TESTSUITE_ALLOW_ROOT: 1
TESTSUITE_DEBUG: 1
PYTEST_ARGS: "-k mysql -vvs"
run: |
curl -LsS https://r.mariadb.com/downloads/mariadb_repo_setup | sudo bash
sudo apt install -y mariadb-server
make venv-tests
- name: Build documentation
run: |
make build-docs