mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-02 19:20:14 +03:00
Pipeline: add github workflows (#1)
Tooling: add github actions * Add github actions to run pytest / flake8 / black * Use clickhouse:20.6 (tests fail with 21.x, 20.8) * Keep black away from pypy
This commit is contained in:
parent
bdec4843ce
commit
a36e69822b
63
.github/workflows/python-package.yml
vendored
Normal file
63
.github/workflows/python-package.yml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
||||
|
||||
name: Python package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ develop ]
|
||||
pull_request:
|
||||
branches: [ develop ]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Lint on smallest and largest active versions
|
||||
python-version: [3.6, 3.9]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install poetry
|
||||
poetry install
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
poetry run flake8 clickhouse_orm/
|
||||
cd tests && poetry run flake8
|
||||
- name: Check formatting with black
|
||||
run: |
|
||||
poetry run black --line-length 120 --check clickhouse_orm/ tests/
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
clickhouse:
|
||||
image: yandex/clickhouse-server:20.6
|
||||
ports:
|
||||
- 8123:8123
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8, 3.9, pypy3]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install poetry
|
||||
poetry install
|
||||
- name: Test with pytest
|
||||
run: |
|
||||
poetry run pytest
|
|
@ -40,7 +40,7 @@ flake8-bugbear = "^21.4.3"
|
|||
pep8-naming = "^0.12.0"
|
||||
pytest = "^6.2.4"
|
||||
flake8-isort = "^4.0.0"
|
||||
black = "^21.7b0"
|
||||
black = {version = "^21.7b0", markers = "platform_python_implementation == 'CPython'"}
|
||||
isort = "^5.9.2"
|
||||
freezegun = "^1.1.0"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user