-
Notifications
You must be signed in to change notification settings - Fork 680
50 lines (42 loc) · 1.3 KB
/
pytest.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
name: PyTest
on: [push, pull_request]
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- {name: 'CPython 3.7', python: '3.7'}
- {name: 'CPython 3.11', python: '3.11'}
- {name: 'Pypy 3.7', python: 'pypy-3.7'}
- {name: 'Pypy 3.9', python: 'pypy-3.9'}
name: ${{ matrix.name }}
runs-on: ubuntu-latest
timeout-minutes: 2
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Run database server in docker
run: |
docker compose create
docker compose start
echo "wait mysql server"
while :
do
if mysql -h 127.0.0.1 --user=root --execute "SELECT version();" 2>&1 >/dev/null && mysql -h 127.0.0.1 --port=3307 --user=root --execute "SELECT version();" 2>&1 >/dev/null; then
break
fi
sleep 1
done
echo "run pytest"
- name: Install dependencies
run: |
pip install .
pip install pytest
- name: Run test suite
run: |
pytest -k "not test_no_trailing_rotate_event and not test_end_log_pos"