2025-02-09 18:53:36 +01:00
|
|
|
name: mycli
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths-ignore:
|
|
|
|
- '**.md'
|
2025-02-09 19:16:42 +01:00
|
|
|
- 'AUTHORS'
|
2025-02-09 18:53:36 +01:00
|
|
|
|
|
|
|
jobs:
|
2025-02-09 19:16:42 +01:00
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2025-02-09 18:53:36 +01:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2025-02-09 19:16:42 +01:00
|
|
|
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
|
2025-02-09 18:53:36 +01:00
|
|
|
|
|
|
|
steps:
|
2025-02-09 19:13:22 +01:00
|
|
|
- uses: actions/checkout@v4
|
2025-02-09 19:16:42 +01:00
|
|
|
- uses: astral-sh/setup-uv@v1
|
|
|
|
with:
|
|
|
|
version: "latest"
|
2025-02-09 18:53:36 +01:00
|
|
|
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2025-02-09 19:13:22 +01:00
|
|
|
uses: actions/setup-python@v5
|
2025-02-09 18:53:36 +01:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Start MySQL
|
|
|
|
run: |
|
|
|
|
sudo /etc/init.d/mysql start
|
|
|
|
|
|
|
|
- name: Install dependencies
|
2025-02-09 19:16:42 +01:00
|
|
|
run: uv sync --all-extras -p ${{ matrix.python-version }}
|
2025-02-09 18:53:36 +01:00
|
|
|
|
|
|
|
- name: Wait for MySQL connection
|
|
|
|
run: |
|
|
|
|
while ! mysqladmin ping --host=localhost --port=3306 --user=root --password=root --silent; do
|
|
|
|
sleep 5
|
|
|
|
done
|
|
|
|
|
|
|
|
- name: Pytest / behave
|
|
|
|
env:
|
|
|
|
PYTEST_PASSWORD: root
|
2025-02-09 18:56:59 +01:00
|
|
|
PYTEST_HOST: 127.0.0.1
|
2025-02-09 18:53:36 +01:00
|
|
|
run: |
|
2025-02-09 19:16:42 +01:00
|
|
|
uv run tox -e py${{ matrix.python-version }}
|
2025-02-09 18:53:36 +01:00
|
|
|
|
2025-02-09 19:16:42 +01:00
|
|
|
- name: Run Style Checks
|
|
|
|
run: uv run tox -e style
|