fix: workflows Coverage check

This commit is contained in:
sw 2022-06-04 13:02:44 +08:00
parent 6286185a45
commit df2d778919

View File

@ -7,28 +7,29 @@ on:
branches: branches:
- master - master
jobs: jobs:
# Run tests.
# See also https://docs.docker.com/docker-hub/builds/automated-testing/
test: test:
runs-on: ${{ matrix.os }} runs-on: ubuntu-latest
services:
clickhouse:
image: clickhouse/clickhouse-server
ports:
- 8123:8123
- 9000:9000
options: --ulimit nofile=262144:262144
strategy: strategy:
matrix: matrix:
python-version: [3.9] python-version: [ "3.9" ]
os: [ubuntu-latest]
fail-fast: false
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-python@v1 - name: Build and Install
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies 🔨
run: | run: |
python -m pip install --upgrade pip
pip install build pip install build
python -m build python -m build
pip install dist/* pip install dist/*
pip install coveralls pip install coveralls
- name: Run coverage - name: UnitTest
run: | run: |
coverage run --source=clickhouse_orm -m unittest coverage run --source=clickhouse_orm -m unittest
- name: Upload Coverage - name: Upload Coverage
@ -37,8 +38,16 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true COVERALLS_PARALLEL: true
coveralls:
name: Finish Coveralls
needs: test
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished - name: Finished
run: | run: |
pip3 install --upgrade coveralls
coveralls --finish coveralls --finish
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}