From df2d77891992e4df331c9f1660c63a89f924d1ec Mon Sep 17 00:00:00 2001 From: sw <935405794@qq.com> Date: Sat, 4 Jun 2022 13:02:44 +0800 Subject: [PATCH] fix: workflows Coverage check --- .github/workflows/coverage.yml | 35 +++++++++++++++++++++------------- 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index e5e1b93..d29086c 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -7,28 +7,29 @@ on: branches: - master jobs: + # Run tests. + # See also https://docs.docker.com/docker-hub/builds/automated-testing/ 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: matrix: - python-version: [3.9] - os: [ubuntu-latest] - fail-fast: false - + python-version: [ "3.9" ] steps: - uses: actions/checkout@v2 - - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies 🔨 + - name: Build and Install run: | - python -m pip install --upgrade pip pip install build python -m build pip install dist/* pip install coveralls - - name: Run coverage + - name: UnitTest run: | coverage run --source=clickhouse_orm -m unittest - name: Upload Coverage @@ -37,8 +38,16 @@ jobs: 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 }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file