Fix tests #433
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: build | |
jobs: | |
tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
python-version: | |
- "3.7" | |
- "3.8" | |
- "3.9" | |
- "3.10" | |
- "3.11" | |
- "3.12" | |
include: | |
- clickhouse-version: 18.14.9 | |
clickhouse-org: yandex | |
- clickhouse-version: 19.3.5 | |
clickhouse-org: yandex | |
- clickhouse-version: 22.5.1.2079 | |
clickhouse-org: clickhouse | |
- clickhouse-version: 23.8.4.69 | |
clickhouse-org: clickhouse | |
services: | |
clickhouse-server: | |
image: ${{ matrix.clickhouse-org }}/clickhouse-server:${{ matrix.clickhouse-version }} | |
ports: | |
- 8123:8123 | |
- 9000:9000 | |
name: ${{ matrix.python-version }} CH=${{ matrix.clickhouse-version }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
- name: Install test requirements | |
run: | | |
pip install --upgrade pip setuptools wheel | |
pip install flake8 flake8-print coverage | |
python testsrequire.py | |
python setup.py develop | |
# Limit each test time execution. | |
pip install pytest-timeout | |
- name: Run flake8 | |
run: flake8 | |
- name: Run tests | |
run: coverage run --source=clickhouse_sqlalchemy -m pytest --timeout=10 -v | |
timeout-minutes: 2 | |
- name: Set up Python for coverage submission | |
if: ${{ matrix.python-version == '2.7' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.8 | |
architecture: x64 | |
- name: Install coveralls | |
run: | | |
# Newer coveralls do not work with github actions. | |
pip install 'coveralls<3.0.0' | |
- name: Upload coverage | |
run: coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_PARALLEL: true | |
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} CH=${{ matrix.clickhouse-version }} | |
coveralls-finished: | |
name: Indicate completion to coveralls.io | |
needs: tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Finished | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |