mirror of
https://github.com/Infinidat/infi.clickhouse_orm.git
synced 2025-08-02 11:10:11 +03:00
ci
This commit is contained in:
parent
8500613eb8
commit
c262df6a82
64
.github/workflows/ci.yml
vendored
Normal file
64
.github/workflows/ci.yml
vendored
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
name: ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Publish `master` as Docker `latest` image.
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
|
||||||
|
# Publish `v1.2.3` tags as releases.
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
# Run tests for any PRs.
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: ch_orm
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Run tests.
|
||||||
|
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
services:
|
||||||
|
clickhouse:
|
||||||
|
image: clickhouse/clickhouse-server
|
||||||
|
ports:
|
||||||
|
- 8123:8123
|
||||||
|
- 9000:9000
|
||||||
|
options: --ulimit nofile=262144:262144
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build and Install
|
||||||
|
run: |
|
||||||
|
pip install build
|
||||||
|
python -m build
|
||||||
|
pip install dist/*
|
||||||
|
pip install coverage
|
||||||
|
- name: UnitTest
|
||||||
|
run: |
|
||||||
|
coverage run --source=clickhouse_orm -m unittest
|
||||||
|
- name: Upload Coverage
|
||||||
|
run: coveralls --service=github
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
|
||||||
|
COVERALLS_PARALLEL: true
|
||||||
|
|
||||||
|
coveralls:
|
||||||
|
name: Finish Coveralls
|
||||||
|
needs: test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: python:3-slim
|
||||||
|
steps:
|
||||||
|
- name: Finished
|
||||||
|
run: |
|
||||||
|
pip3 install --upgrade coveralls
|
||||||
|
coveralls --finish
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
42
.github/workflows/unittest.yml
vendored
42
.github/workflows/unittest.yml
vendored
|
@ -1,42 +0,0 @@
|
||||||
name: Docker
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# Publish `master` as Docker `latest` image.
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
# Run tests for any PRs.
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
IMAGE_NAME: ch_orm
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
# Run tests.
|
|
||||||
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Pull images
|
|
||||||
run: |
|
|
||||||
docker pull clickhouse/clickhouse-server
|
|
||||||
docker run -d --network=host --name some-clickhouse-server --ulimit nofile=262144:262144 clickhouse/clickhouse-server
|
|
||||||
|
|
||||||
- name: Build and Install
|
|
||||||
run: |
|
|
||||||
pip install build
|
|
||||||
python -m build
|
|
||||||
pip install dist/*
|
|
||||||
|
|
||||||
- name: UnitTest
|
|
||||||
run: |
|
|
||||||
python -m unittest
|
|
|
@ -2,6 +2,8 @@ A fork of [infi.clikchouse_orm](https://github.com/Infinidat/infi.clickhouse_orm
|
||||||
|
|
||||||
This repository expects to use more type hints, and will drop support for Python 2.x.
|
This repository expects to use more type hints, and will drop support for Python 2.x.
|
||||||
|
|
||||||
|
[](https://coveralls.io/github/sswest/ch-orm?branch=develop)
|
||||||
|
|
||||||
Introduction
|
Introduction
|
||||||
============
|
============
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user