Skip to content

Remove coverlet.collector (#562) #780

Remove coverlet.collector (#562)

Remove coverlet.collector (#562) #780

Workflow file for this run

name: Tests
on:
push:
branches: [ main ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main ]
jobs:
coverage:
name: Code Coverage
uses: ./.github/workflows/reusable.yml
with:
coverage: true
permissions:
statuses: write
compare:
name: Compare coverage
runs-on: ubuntu-latest
if: false
permissions:
statuses: write
needs:
- coverage
steps:
- name: Install pycobertura
run: pip install pycobertura
- name: Checkout
uses: actions/checkout@v4
- name: Checkout main
uses: actions/checkout@v4
with:
ref: main
path: main
- name: Download coverage
uses: actions/download-artifact@v4
with:
name: coverage
path: ${{ github.workspace }}/ClickHouse.Client
- name: Download 'main' coverage
uses: benday-inc/download-latest-artifact@main
with:
token: ${{ github.token }}
repository_owner: ${{ github.repository_owner }}
repository_name: ClickHouse.Client
workflow_name: ${{ github.workflow }}
branch_name: main
artifact_name: coverage
download_path: ${{ github.workspace }}/main/ClickHouse.Client
download_filename: coverage.zip
- name: Unzip 'main' coverage
working-directory: ${{ github.workspace }}/main/ClickHouse.Client
run: unzip coverage.zip
- name: Report diff annotations
run: pycobertura diff ./main/ClickHouse.Client/coverage.cobertura.xml ./ClickHouse.Client/coverage.cobertura.xml
--format github-annotation
continue-on-error: true
- name: Report diff summary
run: pycobertura diff ./main/ClickHouse.Client/coverage.cobertura.xml ./ClickHouse.Client/coverage.cobertura.xml
--format markdown >> $GITHUB_STEP_SUMMARY
continue-on-error: true
- name: Generate diff json
run: pycobertura diff ./main/ClickHouse.Client/coverage.cobertura.xml ./ClickHouse.Client/coverage.cobertura.xml --format json --output coverage.diff.json
continue-on-error: true
- name: Set coverage status
env:
GITHUB_TOKEN: ${{ github.token }}
run: python ${{ github.workspace }}/.github/coverage-status.py
--coverage-file ./ClickHouse.Client/coverage.cobertura.xml
--repository ${{ github.event.pull_request.head.repo.full_name || github.repository }} --sha ${{ github.event.pull_request.head.sha || github.sha }}
- name: Set coverage diff status
env:
GITHUB_TOKEN: ${{ github.token }}
run: python ${{ github.workspace }}/.github/coverage-status.py
--coverage-file coverage.diff.json
--repository ${{ github.event.pull_request.head.repo.full_name || github.repository }} --sha ${{ github.event.pull_request.head.sha || github.sha }}
regress-clickhouse:
name: ClickHouse regression
uses: ./.github/workflows/reusable.yml
with:
clickhouse-version: ${{ matrix.version }}
strategy:
fail-fast: false
matrix:
version:
- '21.3'
- '21.8'
- '22.3'
- '22.8'
- '22.9'
- '22.12'
- '23.3'
- '23.6'
- '23.8'
- '23.9'
regress-dotnet:
name: .NET regression
uses: ./.github/workflows/reusable.yml
with:
framework: ${{ matrix.framework }}
needs:
- coverage
strategy:
fail-fast: false
matrix:
framework: ['net8.0', 'net7.0', 'net6.0', 'net5.0', 'netcoreapp3.1']
integration:
name: Integration Tests
runs-on: ubuntu-latest
needs:
- coverage
services:
clickhouse:
image: clickhouse/clickhouse-server:latest
ports:
- 8123:8123
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/cache@v4
name: Cache NuGet
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget-
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
3.1.x
6.x
8.x
- name: Install GitHubActionsTestLogger
run: dotnet add ClickHouse.Client.IntegrationTests/ClickHouse.Client.IntegrationTests.csproj package GitHubActionsTestLogger --no-restore
- name: Test with coverage
run: dotnet test ClickHouse.Client.IntegrationTests/ClickHouse.Client.IntegrationTests.csproj --framework net8.0 --configuration Release --verbosity normal --logger GitHubActions /clp:ErrorsOnly /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura /p:SkipAutoProps=true
env:
CLICKHOUSE_CONNECTION: Host=localhost;Port=8123
CLICKHOUSE_VERSION: latest