Fix 323 #308
Workflow file for this run
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
on: [push, pull_request] | |
name: "SQLAlchemy >=2.0.0 versions" | |
jobs: | |
tests: | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- "3.12" | |
clickhouse-version: | |
- 23.8.4.69 | |
sa-version: [0, 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] | |
name: ${{ matrix.python-version }} SA=2.0.${{ matrix.sa-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v1 | |
# with: | |
# username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
# password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Install test requirements | |
run: | | |
pip install --upgrade pip setuptools wheel | |
python testsrequire.py | |
python setup.py develop | |
# Limit each test time execution. | |
pip install pytest-timeout | |
- name: Install SQLAlchemy | |
run: pip install sqlalchemy==2.0.${{ matrix.sa-version }} | |
- name: Setup /etc/hosts | |
run: | | |
# Overriding setup.cfg. Set host=clickhouse-server | |
sed -i 's/^host=localhost$/host=clickhouse-server/' setup.cfg | |
# Make host think that clickhouse-server is localhost | |
echo '127.0.0.1 clickhouse-server' | sudo tee /etc/hosts > /dev/null | |
- name: Start ClickHouse server container | |
run: | | |
echo "VERSION=${{ matrix.clickhouse-version }}" > tests/.env | |
if [[ "${{ matrix.clickhouse-version }}" > "21.7" ]]; then echo "ORG=clickhouse"; else echo "ORG=yandex" ; fi >> tests/.env | |
docker compose -f tests/docker-compose.yml up -d | |
- name: Run tests | |
run: pytest --timeout=10 -v | |
timeout-minutes: 2 |