Update the README to include the latest mentions of python-mysql-repl… #618
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PyTest | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
PYTEST_SKIP_OPTION: "not test_no_trailing_rotate_event and not test_end_log_pos" | |
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.10', python: 'pypy-3.10'} | |
name: ${{ matrix.name }} | |
runs-on: ubuntu-latest | |
timeout-minutes: 3 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
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 tests for mysql-5 | |
working-directory: pymysqlreplication/tests | |
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-5 | |
- name: Run tests for mysql-5-ctl | |
working-directory: pymysqlreplication/tests | |
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-5-ctl | |
- name: Run tests for mysql-8 | |
working-directory: pymysqlreplication/tests | |
run: pytest -k "$PYTEST_SKIP_OPTION" --db=mysql-8 | |
- name: Run tests for mariadb-10 | |
working-directory: pymysqlreplication/tests | |
run: pytest -k "$PYTEST_SKIP_OPTION" -m mariadb --db=mariadb-10 |